0
親ゲームオブジェクトをUnityEditorに配置し、子ゲームオブジェクトをコードから見ることは可能ですか?私は必要な構造を持つカスタムクラスを作成しようとしましたが、ナットの団結はそれを理解していません。コードから子ゲームオブジェクトを見る
public Path Path1;
public Path Path2;
public Path Path3;
public Path Path4;
[Serializable]
public class Path : MonoBehaviour
{
public List<Way> Ways;
public Path()
{
}
}
ウェイクラス
[Serializable]
public class Way : MonoBehaviour
{
public Transform StartPoint { get; set;}
public Transform[] EndPoints { get; set;}
public Transform[] AngleWaypoints { get; set;}
public Way()
{
}
public Way (Transform startPoint, Transform[] endPoints, Transform[] angleWaypoints)
{
this.StartPoint = startPoint;
this.EndPoints = endPoints;
this.AngleWaypoints = angleWaypoints;
}
}
影響なしが表示されますデバッグにUnityEditorモードを変更することができます。私はGameObjectをPathクラスに入れようとしています –
この問題を明確にするために、コードまたはUnityEditorのスクリーンショットを追加できますか? – asantacreu
私の回答を編集しました@ЧечилКрым – asantacreu