Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How do I select from the children of a class from the GUI?

$
0
0
I want to be able to select from the children of a class in the GUI. Like so: ![alt text][1][1]: /storage/temp/14876-selectability.png The little option boxes appear when it is a child of MonoBehavior, however they are useless because it won't let me select to use AbiliyEffect or its children. Which I want to select its children, but when it is independent (a base class) it doesn't show any selection boxes at all. Code: using UnityEngine; using System.Collections; public class AbilityEffect:MonoBehaviour { public void Activate() { } } public class AbilityInv { [SerializeField] public List AbilityList; public Ability[] EquippedAbilities; [SerializeField] public List OwnedAbilities; void Start() { EquippedAbilities = new Ability[3]{AbilityList[0],AbilityList[1],AbilityList[2]}; OwnedAbilities = AbilityList; } } [System.Serializable] public class Ability { public string AbilityName; public AbilityEffect abilityEffect; }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>