Hi, I have my main char (the player) with a mask that has the remember visibility set on off at start. I apply that on the player prefab and remove it from the scene. At some point in the game, the mask should be showed on the player face, so i put an object visibility on the mask, but i cannot find the mask in the game object, because it's only in the player prefab under the resources folder...
How can i turn on the mask on the player face? >-)
Thanx all!
Comments
Instead, use multiple player prefabs. Have one prefab with the mask, one without.
In the Settings Manager, choose Player switching: Allow, allocate your prefabs, and set a default. You can then use the Player: Switch Action mid-game when he puts the mask on.
For instance:
Any issues with the player-switching feature should be addressed, regardless. If you can provide more details about your configration that can be used to recreate the issue, please post them in a separate thread so that I can look into it.
However, for your case I would recommend using animation to control the transparency / visibility of your various body parts so that they can be controlled using the "Character: Animate" Action.
What animation engine does your character makes use of? The ideal way to do this would be to place such animations in your Animator controller as sub-layers controlled by parameters, and then control those parameters using the above Action.
I've dug this up because I want to know if there's been any updates here.
I have a similar situation where I use child objects attached to the player character, working as equipment/clothes and stuff.
The reason I want to check with you again (instead of going with the animation method) is because when I control/check the visibility of one of these objects within the action list connected to the inventory item, it works fine, because it records constantID.
However, recording the ID doesn't seem to be an option when I check the visibility within the scene, in a standard interaction.
If this isn't possible I can live without it, but since it works perfectly in one case I'm just curious why it doesn't work in the other.
This thread is outdated, now. Remember scripts can since be added to the Player prefab.
If you want a scene-based object to refer to a prefab's child, how are you assigning it? By dragging the prefab into the scene and from there into the Action? That won't record an ID, as the Action considers the object to be a regular scene object, and not an asset file that requires one.
What you can do, however, is move your Actions to an ActionList asset file and have your Interaction refer to this by setting its Actions source to Asset File.