예제 #1
0
 public void UpdateComponets()
 {
     coreAmc       = CoreAMC.istance;
     renderer      = GetComponent <Renderer>();
     nameBaseCount = coreAmc.GetNameDataCount(nameBase);
     UpdateRender(0);
 }
예제 #2
0
        public void UpdateRender(int value)
        {
            nameBaseCount = coreAmc.GetNameDataCount(nameBase);
            nameBase      = coreAmc.amcData[SilderNameBase].DataName;

            if (useCustomTexture == false)
            {
                renderer.material.mainTexture = coreAmc.GetTexture(nameBase, value);
            }
            else
            {
                if (CustomTexture == null)
                {
                    renderer.material.mainTexture = coreAmc.GetTexture(nameBase, value);
                    useCustomTexture = false;
                }
                else
                {
                    renderer.material.mainTexture = CustomTexture;
                }
            }

            if (useCustomShader == false)
            {
                renderer.material.shader = coreAmc.GetShader(nameBase);
            }
            else
            {
                if (CustomShader == null)
                {
                    renderer.material.shader = coreAmc.GetShader(nameBase);
                    useCustomShader          = false;
                }
                else
                {
                    renderer.material.shader = CustomShader;
                }
            }
        }