Example #1
0
 public virtual void Awake()
 {
     if (Model == null)
     {
         Model = GetComponent <DceModel>();
     }
 }
Example #2
0
        public void Awake()
        {
            outfitService = Service.Get <DceLoadingService>();
            if (Model == null)
            {
                Model = GetComponent <DceModel>();
            }
            Animator component = GetComponent <Animator>();

            component.avatar = Model.Definition.UnityAvatar;
            onAwake();
        }
Example #3
0
        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);
        }