using System.Collections; using System.Collections.Generic; using UnityEngine; public class test2 { private int a; public int b; public void Abc() { } private void Abc2() { } } public class test : MonoBehaviour { Test2 aaa;// Test2를 가지고 있는 aaa void Abc(){ aaa.b = 5;//사용가능 aaa.a = 5; //사용불가 } }