This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import re | |
import subprocess | |
from pathlib import Path | |
def find_version(project_settings_path): |
This file contains hidden or 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
private void OnPresetSelected(object userdata) | |
{ | |
// We want to quickly define some string collections as "presets". | |
foreach (var preset in presetsOld) | |
{ | |
foreach (var prop in preset) | |
Debug.Log(prop); | |
} | |
// But it's much nicer if each collection has a name. |
This file contains hidden or 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
/// <summary> | |
/// Creates beings imbued with magical powers. | |
/// </summary> | |
public class WizardFactory | |
{ | |
public Wizard Create() | |
{ | |
// Just imagine this as part of some editor interface | |
// or default values that are hardcoded for any reason. | |
return new Wizard |
This file contains hidden or 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.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
using UnityEngine.UI; | |
public static class ExportBuiltinUISprites | |
{ | |
private const string outputDirectory = "Assets/Graphics/"; |
This file contains hidden or 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 UnityEditor; | |
using UnityEngine; | |
public class CircleMath : MonoBehaviour | |
{ | |
public Vector3 position = Vector3.right; | |
public float angleStart = 20; | |
public float angleEnd = 270; | |
public float duration = 1f; |
This file contains hidden or 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; | |
/// <summary> | |
/// Demonstrates how to use <see cref="UnityEditor.PreviewRenderUtility"/> | |
/// to render a small interactive scene in a custom editor window. | |
/// </summary> | |
public class CustomPreviewExample : EditorWindow | |
{ | |
[MenuItem("My Tools/Custom Preview")] |
This file contains hidden or 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
#if UNITY_EDITOR | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public class ImageGenerator : ScriptableWizard | |
{ | |
[MenuItem("Nementic/Utility/Image Generator...")] | |
public static void CreateWizard() | |
{ |