Different utility classes for my other packages to work with.
To add this package to the project, follow these steps:
- Open PackageManager;
- Select "Add package from get URL";
- insert this link
https://github.com/Paulsams/MiscUtilities.git
- Used by:
- ChoiceReferenceAttribute: https://github.com/Paulsams/ChoiceReferenceAttribute
- RepairerSerializeReferences: https://github.com/Paulsams/RepairerSerializeReferences
- SearchableAttribute: https://github.com/Paulsams/SearchableAttribute
If you do not have a name conflict with my utilities, then you can make my namespace be added to the script automatically:
- Create a folder "ScriptTemplates" in the root of the project;
- Create a file with the name: "81-C# Script-NewBehaviourScript.cs";
- And replace all the text in it with this text (one tab before #ROOTNAMESPACEBEGIN# is required):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Paulsams.MicsUtils;
#ROOTNAMESPACEBEGIN#
public class #SCRIPTNAME# : MonoBehaviour
{
}
#ROOTNAMESPACEEND#
- GameObjectLayer is a structure that allows you to select a layer in the inspector without bit shift operators, that is, for comparison with GameObject.layer;
- ReadonlyField is an attribute so that you can see the value in the inspector, but not change it (but, as I understand it, it only works on non-custom types that do not have their own PropertyDrawer. And I think this because the custom PropertyDrawer redraws what ReadonlyAttribute called).
- IgnoreAttribute - allows you to ignore the field itself and immediately draw all child fields.
- ShowUnityObjectAttribute - allows you to draw a dropdown inside which the UnityEngine.Object fields will be drawn.
For example: ScriptableObject.
To open scripting API documentation, follow this link.