hello, i want to ask to how i can access to a nested class of a script and use the variable
some1.some2.some3 coordin; //here i'm declaring the script
coordin = gameobject.GetComponent<some1.some2.some3>(); //getting from the gameobject
and then use like this maxX = coordin.direction.x; //try to accessing at the variable
while the source script is something like that
public class some1 : MonoBehaviour {
//somethings
[System.Serializable]
public class some2
{
[System.Serializable]
public class some3
{
[SerializeField]
public Vector3 direction=vector3.one; //i need this value
i can’t access it, unity give me an error saying it cannot access it from the gameobject or that “some2” or “some3” are not component… i don’t know how i can access to them…