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 }
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(); }