Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Created August 28, 2019 09:19
Show Gist options
  • Save ciwolsey/eeca96694ad5f2c5ad0c07a9426bdb4b to your computer and use it in GitHub Desktop.
Save ciwolsey/eeca96694ad5f2c5ad0c07a9426bdb4b to your computer and use it in GitHub Desktop.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
interface INode{ }
[Serializable]
class RootNode : INode
{
[SerializeReference] public INode left;
[SerializeReference] public INode right;
}
[Serializable]
class SubNode : RootNode
{
[SerializeReference] INode parent;
}
[Serializable]
class LeafNode : INode
{
[SerializeReference] public INode parent;
}
[CreateAssetMenu()]
class Testing : ScriptableObject
{
[SerializeReference]
public List<RootNode> m_Trees;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment