Skip to content

Instantly share code, notes, and snippets.

View inertiave's full-sized avatar
๐ŸŒด
On vacation

๊ด€์„ฑ ์ฃผ๋„ ๊ฐœ๋ฐœ inertiave

๐ŸŒด
On vacation
View GitHub Profile
using UnityEngine;
[DefaultExecutionOrder(ExecuteOrder.UI_INITIALIZE)]
public class UIManager : MonoBehaviour
{
void Awake()
{
Debug.Log("UIManager Initialized");
}
}
public class ExecuteOrder {
public const int FIRST = -29900;
public const int INITIALIZE = -8000;
public const int UI_INITIALIZE = -6000;
public const int CONTENT_INITIALIZE = -4000;
public const int LOGIN_INIT = -2000;
public const int LAST = 29900;
}
using UnityEngine;
public class AtlasGenerator : MonoBehaviour
{
void Awake()
{
CreateAtlas();
Debug.Log("Atlas Generated!");
}
using System;
using UnityEngine;
public class LoginModule : MonoBehaviour
{
void Awake()
{
byte[] bytes = new byte[0];
ILoginModule loginModule = new LocalLoginModule();
using UnityEngine;
public class UIManager : MonoBehaviour
{
void Awake()
{
Debug.Log("UIManager Initialized");
}
}
using UnityEngine;
namespace CQ.Test {
public class CurveAssetUsage : MonoBehaviour {
public AnimationCurveAsset curveAsset;
AnimationCurve currentCurve;
// Scriptable Object ์—์„œ ์ปค๋ธŒ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ๋‹ค ์ปค๋ธŒ๋กœ ์‚ฌ์šฉํ•  ๋•Œ
void SetCurve(AnimationCurveAsset curve)
namespace UnityEngine {
[CreateAssetMenu(menuName = "Animation Curve", order = 400)]
public class AnimationCurveAsset : ScriptableObject {
public AnimationCurve curve = AnimationCurve.Linear(0, 0, 1, 1);
public static implicit operator AnimationCurve(AnimationCurveAsset me)
{
return me.curve;
}
[UnityEditor.CustomPropertyDrawer(typeof(ReadOnlyAttribute), true)]
public class ReadOnlyDrawer : UnityEditor.PropertyDrawer
{
public override float GetPropertyHeight(UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
{
return UnityEditor.EditorGUI.GetPropertyHeight(property, label, true);
}
public override void OnGUI(UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
using UnityEngine;
public class Sample : MonoBehaviour {
public string publicField;
[ReadOnly]
public string readOnlyField;
[ReadOnly(EReadOnlyType.FULLY_DISABLED)]
public enum EReadOnlyType {
FULLY_DISABLED,
EDITABLE_RUNTIME,
EDITABLE_EDITOR,
}
public class ReadOnlyAttribute : UnityEngine.PropertyAttribute {
public readonly EReadOnlyType runtimeOnly;