Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander van der Zalm Bahamutho

View GitHub Profile
@Bahamutho
Bahamutho / OneLineFieldsAttribute.cs
Created Aug 9, 2018
OneLineFields - Easily display all the fields of one class or struct with the [OneLineFields] property. Contains options for formatting and making it read only.
View OneLineFieldsAttribute.cs
using System.Collections;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
/*
Usage:
[OneLineFields]
public MyClass/MyStruct myVar;
@Bahamutho
Bahamutho / OnChangedCallAttribute.cs
Last active Sep 15, 2020
Unity3D - PropertyAttribute - OnChanged Call a method (more options(arguments, playmodeOnly/editorOnly/Both & basic error checking)
View OnChangedCallAttribute.cs
using System.Linq;
using UnityEngine;
using UnityEditor;
using System;
public class OnChangedCallAttribute : PropertyAttribute
{
public enum RunTimeCriteriaEnum
{
EditorOnly,
@Bahamutho
Bahamutho / OnChangedCallAttribute.cs
Last active Sep 15, 2020
Unity3D - PropertyAttribute - OnChanged Call a method (basic)
View OnChangedCallAttribute.cs
using System.Linq;
using UnityEngine;
using UnityEditor;
using System.Reflection;
/// Feel free to us this. :)
public class OnChangedCallAttribute : PropertyAttribute
{
public string methodName;
@Bahamutho
Bahamutho / RuleTileEditor.cs
Created Jun 22, 2018
Extends the ruletile so that it distinguishes between this, not this, empty and dont care.
View RuleTileEditor.cs
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor.Sprites;
using UnityEditorInternal;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Tilemaps;
using Object = UnityEngine.Object;
You can’t perform that action at this time.