hey guys
i want enable and disable gameobject for another scene
ex : if the player buy a new character disable the current character and enable the new character
As Soraphis pointed out, this can be done many ways. Here is how you could do it with static variable:
public class PersistantData
{
public static bool SwitchingCharacter = false;
}
Then in the scene, you’ll need a script to check the variable and behave as you like:
void Start ()
{
if (PersistantData.SwitchingCharacter)
{
// TODO: enable and disable gameobjects
PersistantData.SwitchingCharacter = false; // reset condition
}
}