浏览代码

Silenced warning about onCanvasGUI (#15)

* Silenced warning about onCanvasGUI

* Converted onCanvasGUI to an event

* @peeweek's pointed out this should be an event, so doing it this way rather than just silencing the warning
/main
GitHub 4 年前
当前提交
fab47777
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      Editor/Common/Canvas/VFXToolboxCanvas.cs

7
Editor/Common/Canvas/VFXToolboxCanvas.cs


using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

}
private Texture m_Texture;
internal CanvasGUIDelegate onCanvasGUI;
internal delegate void CanvasGUIDelegate();
internal event EventHandler onCanvasGUI;
internal VFXToolboxCanvas(Rect displayRect, string shaderName = "Packages/com.unity.vfx-toolbox/Editor/Common/Canvas/Shaders/VFXToolboxCanvas.shader")
{

#endif
if (showGrid) DrawGrid();
if (onCanvasGUI != null)
onCanvasGUI();
onCanvasGUI?.Invoke(this, EventArgs.Empty);
}
else
GUI.Label(LocalRect, VFXToolboxGUIUtility.Get("No Texture"), EditorStyles.centeredGreyMiniLabel);

正在加载...
取消
保存