0
By Design

Enter& Exit Player Actions is not working with specific condition

JOON 2 months ago in Game Creator updated by Marti (Lead Developer) 2 months ago 1


it is very weird situation for me. I tried to make penalty zone to quit the player when she is hiding at edges of maps. to show where is the panalty zones, I turned on mesh renderer 

I made 2 actions, one is player enter, and the other is player exit. I added these actions into 2 penalty zones by my hands. these 2 penalty zones are working pretty well in Editor player and built Application.

the result of entering into penalty zone is the warning message and count-down 30 seconds like below. 2 hand-made penalty zones are working well without any problem.

and I copied & pasted triggers on the other 2 penalty zones which I prepared for this.

in the Editer Player, it has no problem, it is working well like other 2 hand-made penalty zone.

however, the two penalty zones with copied triggers are never working like others in the built application 

maybe the solution is delete copied triggers and add new triggers by my hands. but I really want to use "Copy & paste" Triggers&Conditions&Actions to make games easier.

Unity version:
Game Creator version:
By Design

The copy & paste of components is something that's been bugging for a while now. However, due to their nature, it's a bit difficult to control: When Unity copies a component, it makes a shallow copy of its serialized properties and and duplicates the values on a new component. However, if it finds a reference to a component, it keeps that component as a reference instead of copying that component too, even if its a child or sibling of the same game object.

I understand the decision why Unity made it work this way. However due to the lack of support for serialized polymorphism, Actions (each instruction) is stored as a component. This means that if you have a game object with an Actions object, and you copy & paste it, the instructions list will be shared between the two.

This is one of the main reasons why we want to start working on a new Game Creator version. Unity 2019.3 started supporting (as alpha) polymorphic serialization, which we plan to take full advantage.

Sorry this is a bummer.