Merge pull request #336 from Unity-Technologies/zxw/expose_onGUI_to_developer
expose onGUI
This commit is contained in:
Коммит
e7500b3768
|
@ -111,6 +111,10 @@ namespace Unity.UIWidgets.Editor {
|
||||||
Input_OnDisable();
|
Input_OnDisable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void onGUI() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void OnGUI() {
|
void OnGUI() {
|
||||||
if (_wrapper != null) {
|
if (_wrapper != null) {
|
||||||
if (_wrapper.didDisplayMetricsChanged(width: _currentWidth, height: _currentHeight,
|
if (_wrapper.didDisplayMetricsChanged(width: _currentWidth, height: _currentHeight,
|
||||||
|
@ -128,6 +132,9 @@ namespace Unity.UIWidgets.Editor {
|
||||||
EditorGUI.DrawPreviewTexture(new Rect(0.0f, 0.0f, width: position.width, height: position.height),
|
EditorGUI.DrawPreviewTexture(new Rect(0.0f, 0.0f, width: position.width, height: position.height),
|
||||||
image: _wrapper.renderTexture, mat: _uiMaterial);
|
image: _wrapper.renderTexture, mat: _uiMaterial);
|
||||||
Input_OnGUIEvent(evt: Event.current);
|
Input_OnGUIEvent(evt: Event.current);
|
||||||
|
|
||||||
|
//user customized onGUI logics goes here
|
||||||
|
onGUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче