示例#1
0
    void OnEnalbe()
    {
        mStartTime = Time.realtimeSinceStartup;
#if UNITY_EDITOR
        if (Decal != null)
        {
            Decal.upHeight   = 2.0f;
            Decal.downHeight = 2.0f;
            Decal.offsetY    = 0.2f;
            Decal.BuildMesh();
        }
#endif
    }
示例#2
0
 void Start()
 {
     if (Decal == null)
     {
         Debug.LogError("未找到Decal");
         return;
     }
     if (Decal.material == null)
     {
         Debug.LogError("Decal上没有材质");
         return;
     }
     Decal.upHeight   = 2.0f;
     Decal.downHeight = 2.0f;
     Decal.offsetY    = 0.2f;
     Decal.BuildMesh();
 }