9 Replies
Hi @Killikario. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
There could be several reasons why some scripts get disabled when you run the game in NormalVR. One possible reason is related to the RealtimeView component. Scene RealtimeViews register with Realtime in
Start()
. If they are disabled, they will never register: Realtime will neither initialize them nor connect them to the datastore. Instead, you can use a custom RealtimeComponent to enable/disable child game objects, scripts, or renderers directly.
Here is the relevant information from the source (https://normcore.io/documentation/realtime/common-questions#can-i-disable-realtimeview):
Another possible reason could be related to the ownership of the objects. In NormalVR, when there are two avatars in a room, your scripts that live on the avatar prefab are instantiated for each avatar (not just the local player). This means that your code will execute on local and remote avatars, once for every player in the scene. If you’d like logic to only apply to a single player, use RealtimeView’s isOwnedLocallyInHierarchy
property.
Here is the relevant information from the source (https://normcore.io/documentation/realtime/common-questions#i-have-a-script-on-my-player-why-is-it-updating-all-players-in-the-room):
Please check these aspects in your game and see if they are causing the issue.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@580413914228195328> kapa.ai is still learning and improving, please let us know how it did by reacting below
Do you have any exceptions or other errors in your console? Unity will disable scripts if they have a null reference exception in start function for example. But that's a unity feature, not normcores fault
no
and there are no null exceptions either
some scripts are programmed to disable themselves when certain conditions are met, the only way to know is to look at the scripts involved or do a search for enabled = false. Not something normcore related.
Strange
Since non of my scripts disable themselves at all
Or i mean they arent programmed to disable themselves
heres the code for one of the scripts that get disabled
How are you instantiating this object?
Scene objects or realtime.instantiate?
realtime.instantiate
post a screenshot of the object
or a video with this happening