public virtual void Awake() { if (Model == null) { Model = GetComponent <DceModel>(); } }
public void Awake() { outfitService = Service.Get <DceLoadingService>(); if (Model == null) { Model = GetComponent <DceModel>(); } Animator component = GetComponent <Animator>(); component.avatar = Model.Definition.UnityAvatar; onAwake(); }
public void SetupRenderer(GameObject gameObject, DceModel model, ref Renderer rend) { if (rend == null) { rend = MeshDef.CreateRenderer(gameObject); } Material material = GetMaterial(); ApplyMaterialProperties(material); ComponentExtensions.DestroyIfInstance(rend.sharedMaterial); rend.sharedMaterial = material; MeshDef.ApplyMesh(gameObject); }