Skip to content

Instantly share code, notes, and snippets.

@EmreDogann
EmreDogann / OrthogonalUnitVector3Attribute.cs
Last active April 21, 2023 02:13
A small Unity Property Attribute I made which aims to modify the rendering of a Vector3 field to only allow the input of an orthogonal unit direction vector.
// This file should go inside a normal directory (i.e. not /Editor) somewhere in your project.
using System;
using UnityEngine;
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
public class OrthogonalUnitVector3Attribute : PropertyAttribute {}