Skip to content

Instantly share code, notes, and snippets.

View Alexander-van-der-Zalm's full-sized avatar

Alexander van der Zalm Alexander-van-der-Zalm

  • Netherlands
View GitHub Profile
@Alexander-van-der-Zalm
Alexander-van-der-Zalm / RuleTileEditor.cs
Created June 22, 2018 19:34
Extends the ruletile so that it distinguishes between this, not this, empty and dont care.
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;
@Alexander-van-der-Zalm
Alexander-van-der-Zalm / OnChangedCallAttribute.cs
Last active March 2, 2023 00:16
Unity3D - PropertyAttribute - OnChanged Call a method (basic)
using System.Linq;
using UnityEngine;
using UnityEditor;
using System.Reflection;
/// Feel free to us this. :)
public class OnChangedCallAttribute : PropertyAttribute
{
public string methodName;
@Alexander-van-der-Zalm
Alexander-van-der-Zalm / OnChangedCallAttribute.cs
Last active September 15, 2020 04:59
Unity3D - PropertyAttribute - OnChanged Call a method (more options(arguments, playmodeOnly/editorOnly/Both & basic error checking)
using System.Linq;
using UnityEngine;
using UnityEditor;
using System;
public class OnChangedCallAttribute : PropertyAttribute
{
public enum RunTimeCriteriaEnum
{
EditorOnly,
@Alexander-van-der-Zalm
Alexander-van-der-Zalm / OneLineFieldsAttribute.cs
Created August 9, 2018 19:26
OneLineFields - Easily display all the fields of one class or struct with the [OneLineFields] property. Contains options for formatting and making it read only.
using System.Collections;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
/*
Usage:
[OneLineFields]
public MyClass/MyStruct myVar;