Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 4.28 KB

File metadata and controls

24 lines (21 loc) · 4.28 KB

Meta Utilities Package

This package contains general utilities for Unity development.

You can install this package by adding the following git url to Package Manager: https://github.com/oculus-samples/Unity-UltimateGloveBall.git?path=/Packages/com.meta.utilities

Utility Description
AutoSet attributes

This attribute is useful for eliminating calls to GetComponent. By annotating a serialized field with [AutoSet], every instance of that field in a Prefab or Scene will automatically be assigned in editor (by calling GetComponent). This assignment is done both in the inspector (using a property drawer) as well as every time the object is saved (using an asset postprocessor).

Note, you can also use [AutoSetFromParent] or [AutoSetFromChildren].
Singleton Simple implementation of the singleton pattern for MonoBehaviours. Access the global instance through the static Instance property. Utilize in your own class through inheritance, for example:
public class MyBehaviour : Singleton<MyBehaviour>
Multiton Similar to Singleton, this class gives global access to all enabled instances of a MonoBehaviour through its static Instances property. Utilize in your own class through inheritance, for example:
public class MyBehaviour : Multiton<MyBehaviour>
EnumDictionary This is an optimized Dictionary class for use with enum keys. It works by allocating an array that is indexed by the enum key. It can be used as a serialized field, unlike System.Dictionary.
Extension Methods A library of useful extension methods for Unity classes.
Netcode Hash Fixer The NetworkObject component uses a unique id (GlobalObjectIdHash) to identify objects across the network. However, certain instances (for example, instances of prefab variants) do not generate these IDs properly. This asset postprocessor ensures that the IDs are always regenerated, which prevents issues networking between the Editor and builds.
Network Settings Toolbar
This toolbar allows for improved iteration speed while working with ParrelSync clones. By consuming the properties set in the NetworkSettings class, multiple Editor instances of the project can automatically join the same instance.
Settings Warning Toolbar
This toolbar gives a helpful warning when the build platform is not set to Android, and gives an option to switch it. This is useful for ensuring that the build platform is Android while doing Quest development.
Build Tools The BuildTools class contains methods for use by Continuous Integration systems.
Menu Helpers When the Unity Search Extensions package is enabled, this adds a helpful context menu item "Graph Dependencies" and adds the "Tools/Find MIssing Dependencies" menu item.
Android Helpers This class gives access to Android Intent extras.
Animation State Triggers / Listeners These classes enable any Object to bind methods to respond to its Animator's OnStateEnter and OnStateExit events.
Camera Facing Simple component for billboarding a renderer.
Dont Destroy On Load (On Enable) Simple component that calls DontDestroyOnLoad in its OnEnable.
Set Material Properties (On Enable) Simple component that sets up a MaterialPropertyBlock for a renderer in its OnEnable.
Nullable Float A serializeable wrapper around float that exposes a float? through its Value property. It uses NaN as a sentinel for null.