D
D
Dmitry Korolev2016-07-07 14:58:02
C++ / C#
Dmitry Korolev, 2016-07-07 14:58:02

Where is the null condition required in LOD?

В этом коде pastebin.com/CJi0sy8A происходят ошибки : NullReferenceException: Object reference not set to an instance of an object
Lod.Start () (at Assets/Game/Scripts/Scene/Lod.cs:15)
NullReferenceException: Object reference not set to an instance of an object
Lod.Update () (at Assets/Game/Scripts/Scene/Lod.cs:21)
как доправить?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2016-07-07
@adressmoeistranici

In Lod.cs:15, either the list is null, or the reference to one of the GameObjects in the models list is nulled, because of this, you break the start and the camera remains empty, which leads to the second error. Check what you have in the inspector for models.
https://docs.unity3d.com/Manual/NullReferenceExcep...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question