Version: 2023.2

EditorGUILayout.EndBuildTargetSelectionGrouping

切换到手册
public static void EndBuildTargetSelectionGrouping ();

描述

关闭以 BeginBuildTargetSelectionGrouping 开头的组。

另请参阅:EditorGUILayout.BeginBuildTargetSelectionGrouping


构建目标选择组

using UnityEditor;

public class BuildTargetGroupExample : EditorWindow { [MenuItem("Examples/Begin-End BuildTarget Grouping")] static void Init() { BuildTargetGroupExample window = (BuildTargetGroupExample)EditorWindow.GetWindow(typeof(BuildTargetGroupExample), true, "My Custom Editor Window"); window.Show(); }

void OnGUI() { BuildTargetGroup selectedBuildTargetGroup = EditorGUILayout.BeginBuildTargetSelectionGrouping(); if (selectedBuildTargetGroup == BuildTargetGroup.Android) { EditorGUILayout.LabelField("Android specific things"); }

if (selectedBuildTargetGroup == BuildTargetGroup.Standalone) { EditorGUILayout.LabelField("Standalone specific things"); }

EditorGUILayout.EndBuildTargetSelectionGrouping(); } }