public UnityMaterialAsset(BaseBehaviour owner) { this.owner = owner; UnityEngine.Renderer renderer = owner.GetComponent <UnityEngine.Renderer>(); if (null != renderer) { this.material = renderer.material; } else { this.material = null; } }