protected override void OnEnable() { base.OnEnable(); var packageName = rootVisualElement.Q <TextField>("packageName"); if (packageName != null) { packageName.value = EditorUtilityHelper.GetPackageName(); packageName.RegisterValueChangedCallback((e) => { }); } var applyPackage = rootVisualElement.Q <Button>("packageApply"); if (applyPackage != null) { applyPackage.clicked += () => { if (string.IsNullOrEmpty(packageName.value)) { packageName.value = EditorUtilityHelper.GetPackageName(); } else { EditorUtilityHelper.ApplyPackageName(packageName.value); } }; } //var btnBuildWindowsDbg = rootVisualElement.Q<TextField>("buildWindowDebug"); //var btnBuildWindowsRelease = rootVisualElement.Q<TextField>("buildWindowRelease"); SetBuildPlatform("buildWindowDebug", () => BuildDebug(BuildTarget.StandaloneWindows64)); SetBuildPlatform("buildWindowRelease", () => BuildRelease(BuildTarget.StandaloneWindows64)); SetBuildPlatform("buildWebGLDebug", () => BuildDebug(BuildTarget.WebGL)); SetBuildPlatform("buildWebGLRelease", () => BuildRelease(BuildTarget.WebGL)); }
private static void LocateDirectory() { string current = GetCurrentDirectory(); EditorUtilityHelper.LocateInProjectPanel(current); }