but the problem resides is when i try to access the controller_instant script to the gamemanager its ok all working but
when i want to access the code gamemanagerscript to the controller_script popping the error “Assets/controller_instant.cs(17,17): error CS0266: Cannot implicitly convert type UnityEngine.Component' to gamemanagescript’. An explicit conversion exists (are you missing a cast?)”
Is it not a monobehavior? Get it like this!
In this example, ScriptName2 is a non-monobehavior class that is created inside the monobehavior ScriptName.
ScriptName2 sn = otherObject.GetComponent<ScriptName>().script2;
To access say… a data script that is created within a monobehavior and is inside that script, you use the second one. But you still need a monobehavior on that object to get the other script in that object.