Тёмный

Object reference not set to the instance of an object - Unity - Udon / VRChat SDK3.0 

PlayerBush001
Подписаться 3,4 тыс.
Просмотров 29 тыс.
50% 1

This is an error message that plagues many newcomers to unity, and so I thought I would make a short tutorial dressing what it actually means, and how to solve it.
So, this is more of a 'how to solve the unity error message: Object reference not set to the instance of an object', but a title like that would be too long...
So hopefully this is helpful. As always, if you have any questions, feel free to ask in the comments bellow! ^^
Come join the discord! / discord
Wanna help support me in making more vrchat stuff? Support me on patreon! (I'm grateful for any support ^^') / playerbush001
#Unity #VRChat #Udon #SDK3

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@woowakgoods
@woowakgoods 2 года назад
I hope you keep on uploading videos You're one of the best vrc related unity information youtubers
@PlayerBush001
@PlayerBush001 2 года назад
Thanks! Been a little quiet recently as I've been busy releasing and bug fixing a small game on vrchat. Got some more videos planned, so look forward to them! ^^
@voskorbia
@voskorbia 2 года назад
This has answered all of my prayers
@Shadsterwolf
@Shadsterwolf 2 года назад
Glad you also show the udonsharp samples too, great stuff.
@PlayerBush001
@PlayerBush001 2 года назад
Glad you liked it ^^ I decided to add the sharp script to it, as this is useful both inside and outside vrchat, and there really wasn't a video out there I was happy with. That being said, while it's useful for sharp users, it's a little distracting for what I'm trying to show with the mouse on the graph..
@user_friendly_9388
@user_friendly_9388 2 года назад
I solved this error by just dropping the object inside the graph like a freaking savage! Nice to see how to do it in a more civilized way :D
@PlayerBush001
@PlayerBush001 2 года назад
Glad it worked out for ya! Personally only stumbled upon that shortcut when I was helping someone out a couple of months ago. Funny to see how many others find it ^^
@therealnagia2461
@therealnagia2461 11 месяцев назад
This was so helpful! thank you!
@PlayerBush001
@PlayerBush001 11 месяцев назад
Glad it helped ^^
@TheMeanArena
@TheMeanArena 6 месяцев назад
Easy to find that error when it is something you're actively working on. Try finding out which object it is in a full game with hundreds of thousands of objects. Good luck!
@ozzyczzy827
@ozzyczzy827 Год назад
I've been getting that error message when I attempt to use Bakery (A Unity Store Asset) Not sure whats causing it
@PlayerBush001
@PlayerBush001 Год назад
It's most likely trying to find a package that doesn't exist. To solve that, you can't really do much, other than reinstall it and a bunch of other things in your project. Alternatively, it could also be something in your scene, that is looking for something that bakery overrides. Unfortunately, these kinda problems with assets are next to impossible to bug fix externally, without looking at the whole project. I would however, still recommend asking around a little bit (recommend trying the official vrchat discord if it's for vrchat), as it might be a common problem that someone can help with ^^
@nyafcanyafca
@nyafcanyafca Год назад
Could you please help me figure out how to create audio that will play when a player enters a collider
@PlayerBush001
@PlayerBush001 Год назад
I did a video on how to 'create an audio button' ages ago (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cQ3hWKY-NiA.html), and that script plays a some audio whenever the 'event, interact' node is called (aka, clicked the button). To do what you are after, you will want to take that script, and replace the 'event, interact' node, with 'event, onPlayerTriggerEnter (playerApi) --> playerApi,is local --> branch -(true)-> Like I did in my jumpscare tutorial (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0cOQufJb0f4.html) Hope that helps ^^
@shadowcatcherfox5186
@shadowcatcherfox5186 Год назад
So this didn't quite resolve my problem. I have a Canvas, with a Text UI object in it, and in an udon script in a different object (outside the canvas tree) has a public variable of type Text, and I dropped the reference of the Text UI object into that variable. But when the script starts, it does not appear to be valid -- the script crashes if I try use it, and I've determined that IsValid() returns false on it. So is there some trick I'm missing here which lets you manipulate other objects in the scene, where dropping in their reference in the inspector fails?
@PlayerBush001
@PlayerBush001 Год назад
ui text and textmeshpro are different, so it could be that. Other than that, I'm a little lost as to what it might be. I recommend asking in vrchat's official discord, under either the 'world-development' or 'udon-questions' channel, as it will be easier to get help there. Ytube comments are a little hard to debug something like this...
@Urotsuki
@Urotsuki 8 месяцев назад
i just dont get it, it works perfectly fine in unity (having referenced it by drag and drop using ‘public GameObject blabla’ but it does not work in vrc for whatever reason x_x
@chimera5946
@chimera5946 2 года назад
can we get a material changer video
@PlayerBush001
@PlayerBush001 2 года назад
Hmm... Maybe, but most times you want to switch a material, you also want to do a bunch of other visual stuff, and so your better off doing it all with an animation. But just for reference, to change a material via code would just be 'mesh renderer, set materiall' or 'mesh renderer, set materials' depending on your model
@Sexysouls_
@Sexysouls_ Год назад
I have this on a avatar?????
@PlayerBush001
@PlayerBush001 Год назад
That means that one of the sdk scripts went to call something, but couldn't find it. If I were to hazard a guess, you may have installed an asset that referenced the sdk, but now that the sdk files have moved with the vrchat companion app, it couldnt find it. If that's not (or you just want help with that), I recommend asking on the official vrchat discord
@Sexysouls_
@Sexysouls_ Год назад
@@PlayerBush001 i fixed it i was banned from the discord so did it myself
@imnottsuki7978
@imnottsuki7978 Год назад
​@@Sexysouls_ how did you do it?
@Sexysouls_
@Sexysouls_ Год назад
@@imnottsuki7978 well i just went back in bleder and fixed it
@lucutes2936
@lucutes2936 Год назад
bruh
@PlayerBush001
@PlayerBush001 Год назад
bruh
@Moodzilla2020
@Moodzilla2020 2 года назад
Actually my vrc world issue in unity is when I clicked publish for windows, it did show the publish panel, but it doesn't work, like a fake screen, I click on anything, description, name, public, private and pubish nothing happens, as if I am clicking on nothing, and also NullReferenceException: Object reference not set to an instance of an object VRCSDK2.RuntimeWorldCreation.Start () (at Packages/com.vrchat.base/Runtime/VRCSDK/Dependencies/VRChat/Scripts/RuntimeWorldCreation.cs:82) is this error same as the one in your video?
@PlayerBush001
@PlayerBush001 Год назад
It is, but for something super internal in the sdk. If your working with udon, then you should have anything using sdk2, which is what the error message is looking for. In fact, if you haven't already, you really should be moving away from sdk2 as it is already depreciated (recommend using sdk3 with the asset 'cyan triggers' if you're making a new world). If you are using sdk3, then something in your scene is using the old sdk2 components, and isn't compatible with udon; causing it to bug out. Hope that helps ^^
@Moodzilla2020
@Moodzilla2020 Год назад
@@PlayerBush001 Fine, so the problem has to do with the sdk, I though it has to do with the code, I'll try, thanks
@Moodzilla2020
@Moodzilla2020 Год назад
@@PlayerBush001 But I am using ver. 2019.4.31f1 of unity man!, please reply!
@Moodzilla2020
@Moodzilla2020 Год назад
@@PlayerBush001 I have the Cyantriggers, I used them and the error still persists!!!!!!, is it because I am using Unity ver. 2019.4.31f1 ?
@PlayerBush001
@PlayerBush001 Год назад
Like i said in my first reply, it looks like you have some sdk2 stuff in your project. You have likely installed an older asset with sdk2 logic in it, and given how completely incompatible it is, you will need to delete it before you can upload or bug fix your world. Other edge cases could be that you updated your project from sdk2 to sdk3 (highly not recommended. redo the logic in a new project instead) and there is some left over logic, or you tried to install sdk2 into a scene that already had sdk3 (or vise versa) (won't ever work)
Далее
The Obscure Lore Of Larva
30:33
Просмотров 1,4 млн
Prank Orchestra
00:10
Просмотров 1,8 млн
3 Hours vs. 3 Years of Blender
17:44
Просмотров 4,8 млн
The Most Impressive Scratch Projects
11:00
Просмотров 4,9 млн
The biggest lie in video games
15:18
Просмотров 1,9 млн
Somebody emailed me a trojan virus
14:06
Просмотров 733 тыс.
Create an Automatic Door - Udon / VRChat SDK3.0
17:00
Making Successful Indie Games Is Simple (But Not Easy)
12:08
I Made the Same Game in 8 Engines
12:34
Просмотров 4,1 млн
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 961 тыс.