Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Sirenix.OdinInspector;
- using Sirenix.Serialization;
- public interface IWaypoint
- {
- List<Connection> Connections { set; get; }
- Vector3 Position { set; get; }
- }
- [System.Serializable]
- public class Connection
- {
- public bool AnchorPoint;
- public Vector3 AnchorPosition;
- [OdinSerialize, ShowInInspector] public IWaypoint Waypoint;
- }
- public class Test : SerializedMonoBehaviour, IWaypoint
- {
- List<Connection> myConnection = new List<Connection>();
- [HideInInspector]
- Vector3 myPosition = new Vector3(1.0f, 1.0f, 1.0f);
- [OdinSerialize, ShowInInspector]
- List<Connection> IWaypoint.Connections
- {
- get { return myConnection; }
- set { myConnection = value; }
- }
- [OdinSerialize, ShowInInspector]
- Vector3 IWaypoint.Position
- {
- get { return myPosition; }
- set { myPosition = value; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement