This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine.UIElements; | |
public class SelectableVisualElement : VisualElement | |
{ | |
internal new class UxmlFactory : UxmlFactory<SelectableVisualElement> { } | |
static SelectableVisualElement CurrentSelected; | |
public virtual string HoverStyle { get => "selectable__hover"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class ScreenDragTest : MonoBehaviour | |
{ | |
public Vector2 ScreenPos = new Vector2(100, 100); | |
public bool ConstantRefresh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class HideSceneToolbar | |
{ | |
[MenuItem("Test/Hide the scene toolbar")] | |
static void Hide() | |
{ | |
var sceneViews = Resources.FindObjectsOfTypeAll<SceneView>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MenuItem("CONTEXT/Component/Find References In Scene")] | |
private static void OnSearchForReferencesToComponent(MenuCommand command) | |
{ | |
var component = command.context as Component; | |
if (component) | |
{ | |
var searchFilter = "ref:" + component.GetInstanceID() + ":"; | |
foreach (SearchableEditorWindow sw in searchableWindows) | |
{ | |
if (sw.m_HierarchyType == HierarchyType.GameObjects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.Localization; | |
using UnityEngine; | |
using UnityEngine.Localization.Tables; | |
public class GenerateStringTables : ScriptableWizard | |
{ | |
public TextAsset jsonFile; | |
public string tableCollectionName = "My Strings"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class HelpBoxExample : EditorWindow | |
{ | |
[MenuItem("UI/Help Box")] | |
static void ShowWindow() | |
{ | |
HelpBoxExample window = (HelpBoxExample)EditorWindow.GetWindow(typeof(HelpBoxExample)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
public class TestProfiler | |
{ | |
[MenuItem("Profile/Start")] | |
public static void Start() | |
{ | |
//UnityEngine.Profiling.Profiler.enabled = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Localization; | |
public class CreateCustomLocale | |
{ | |
[MenuItem("Assets/Create/Localization/Tagalog Locale")] | |
static void CreateTagalogLocale() | |
{ | |
var path = EditorUtility.SaveFilePanelInProject("Save Tagalog Locale", "Tagalog (tl)", "asset", "Save Tagalog Locale", "Assets/"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Localization.Settings; | |
public class NestingExample : MonoBehaviour | |
{ | |
IEnumerator Start() | |
{ | |
yield return LocalizationSettings.InitializationOperation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.Localization; | |
using UnityEngine.Localization.Settings; | |
public class LoadAsset : MonoBehaviour | |
{ | |
IEnumerator LoadDirectlyFromTheDatabase() | |
{ |
OlderNewer