0

'Trigger' serious bug

Two Comet 3 weeks ago in Game Creator updated 3 weeks ago 2

Register 'Action A' in trigger OnStart.

Change the trigger to'player enter'. Register and run 'Action A' again.

At this time, Action A registered in the first OnStart executes once unconditionally.

Is this normal?

IgniterStart.cs 's Start runs even though the component is not visible in the Unity Inspector.

If this is not normal
It seems to be a bug where OnStart doesn't go away properly.
This situation all happens when the apply is 'apply all' to the prefab containing the trigger.

I told Discord, but no one knew how to fix it.
Currently the only solution is to remove the trigger and then re-register.

This is very cumbersome.

Unity version:
2019.4.8
Game Creator version:
1.1.9

It is found with GetComponent before adding here. Is this normal?
Also, it has not been deleted.


In the prefab edit, set it to OnStart and then change it back to OnPlayerEnter.
Solved with the above source.
However, it is still not deleted from the compilation.



If you want to see the bug

Adding a trigger to the inspector while running.

Activate the trigger.

Prefab an object that has a trigger.

Ending execution and bringing the prefab

Even if you switch to another On Player Enter, etc. OnStart still runs.

Now that I think about it, this is not a good idea either.

Problems arise if you are actually using two or more of the same components.

I need the ability to delete or clean up invisible triggers.


In fact, it is not visible in the inspector window, but I found that it is being imported into GetComponent.