I am making a project that observes several objects in one place.
However, I want to protect the information of those objects, and I have to access the objects of those information.
It's really ambiguous how to refer In particular, how to protect the information of game objects in objectmanager.
current representative three script
[Cameramanager.cs]
This is a script that interacts with moving the camera through mouse clicks and clicking objects.
this script access other three script This way ex)
public Gamobject ga;
ObjManager objmanager=ga.GetComponent <ObjManager>();
[objectSetMangager.cs]
Script created to save and use information of multiple Gameobjects this script is singleton
ex) Save the information of the objects that changed the texture
And this script access other three script
[objectMangager.cs]
Script that stores the most important objects that need to be protected
ex) this is implemented this way
private List Gameobject important;
public vector3 ReturnPos(int id)
{
return important[id].transform.position;
}
- how to refer to the important script
- how to access important info?