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
import argparse, shlex | |
def main(): | |
parser = argparse.ArgumentParser('My Command Line Program') | |
parser.add_argument( | |
'--debug', | |
action='store_true', | |
help='Print debug info' | |
) | |
subprasers = parser.add_subparsers(dest='command') |
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 UnityEngine; | |
using Sirenix.OdinInspector.Editor; | |
using UnityEditor; | |
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] | |
public class RichTextAreaAttribute : Attribute | |
{ | |
public bool ShowHelp { get; private set; } | |
public RichTextAreaAttribute() |
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
public static class RectTransformExtensions | |
{ | |
public static void SetLeft(this RectTransform rt, float left) | |
{ | |
rt.offsetMin = new Vector2(left, rt.offsetMin.y); | |
} | |
public static void SetRight(this RectTransform rt, float right) | |
{ | |
rt.offsetMax = new Vector2(-right, rt.offsetMax.y); |
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 UnityEngine; | |
using System.Reflection; | |
using UnityEditor; | |
static class ExtensionMethods | |
{ | |
/// <summary> | |
/// Rounds Vector3. | |
/// </summary> |