Forum rules - please read before posting.

From off, turn it on

I want some objects to be off on start, but since SendMessage is not usable for gameobject, only chance I got is Add/Remove, but this method will not work because if I (remove) object in the first place because I want it off on start and trigger it back to turn it on (add), it will not on (add) because it was removed in the first place. So how to solve this?

Start : Remove
Trigger it : Add

Will not work

Comments

  • If you're removing it to begin with, why have it in the scene at all?  Just use the Add to load it in when you need to.  Set your "Object to add" as a prefab, not as a scene object.  If you want saving/loading to work correctly, do this:
    1. Prefab your object to add, and place it in a Resources folder in your Assets directory.
    2. Add the Remember Transform script to it, and check both Retain in prefab and Save scene presence
    3. Refer to this object, rather than a scene one, in your Add action.
  • Sorry for intruding but one simple reason could be that the game object is a child of another one and needs to move around with its parent, for example. If you use the add function, it won't work, it will just be added in the scene in a position and stay there, unless I've missed something ?

    Then again, I don't know why Alanj2007 wants to activate it instead of adding it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.