Basically I have a simple trigger FSM set up for one platform to create another platform beside it. The problem is I am trying to set up the trigger in order to have the new platform disappear/destroy when the player exits it.
#1. So the first state has 2 Trigger Events, one Enter the other Exit.
#2. Second state Create Object with the platform prefab and empty object to spawn, then when it flows back into the first state it enters the third state.
#3. And the third state has "Destroy Object" action that is suppose to destroy the platform prefab. The problem is I get an error in the console and the game stops running.
Destroying assets is not permitted to avoid data loss.
If you really want to remove an asset use DestroyImmediate(theObject,true);
What do I do to fix this problem.
Thanks.