本文整理汇总了C#中UIWidget.MarkAsChanged方法的典型用法代码示例。如果您正苦于以下问题:C# UIWidget.MarkAsChanged方法的具体用法?C# UIWidget.MarkAsChanged怎么用?C# UIWidget.MarkAsChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIWidget
的用法示例。
在下文中一共展示了UIWidget.MarkAsChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInspectorGUI
/// <summary>
/// Draw the inspector widget.
/// </summary>
public override void OnInspectorGUI()
{
EditorGUIUtility.LookLikeControls(80f);
mWidget = target as UIWidget;
#if UNITY_3_4
PrefabType type = EditorUtility.GetPrefabType(mWidget.gameObject);
#else
PrefabType type = PrefabUtility.GetPrefabType(mWidget.gameObject);
#endif
if (type == PrefabType.Prefab)
{
GUILayout.Label("Drag this widget into the scene to modify it.");
}
else
{
if (!mInitialized)
{
mInitialized = true;
OnInit();
}
NGUIEditorTools.DrawSeparator();
// Check the hierarchy to ensure that this widget is not parented to another widget
if (mHierarchyCheck) CheckHierarchy();
// This flag gets set to 'true' if RegisterUndo() gets called
mRegisteredUndo = false;
// Check to see if we can draw the widget's default properties to begin with
if (OnDrawProperties())
{
// Draw all common properties next
DrawCommonProperties();
}
// Update the widget's properties if something has changed
if (mRegisteredUndo) mWidget.MarkAsChanged();
}
}