Auto View on Asset Store (opens in new tab)

Package details

Latest version
2.51
Last updated
First released
Unity version
2019.4.6 or later
Package size
31 KB
Files
26
Favorites
11
Views in the past week
6

Price tracking

Last checked
Tracked since
Lowest recorded
Free on

Auto

by Oran Bar (opens in new tab)

No ratings yet

Price Free

Get it free on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for Auto, 6 months Current Free; lowest Free; highest Free in this period. $0 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 2

Auto screenshot 1

Auto screenshot 1

About this asset

# Auto Attributes
This package provides 3 attributes:
[Auto], [AutoParent], [AutoChildren]
Autos are field/property attributes that allow to automatically get/fetch components' references when the application is started.
This solution is presented as equivalent of having an Awake function containing GetComponent calls.
It runs before all other Awakes (using script execution ordering), so whenever Awake starts execution, one can assume that no variable with Auto will throw a null exception.
If a component is not found, Auto will provide descriptive logging.
[AutoParent] and [AutoChildren] can also be used on Array variables, and respectively have the same behaviour you would expect from a T[] GetComponentsInParents() or T[] GetComponentsInChildren() call.
Auto also works on inactive objects.
Auto works by hooking into the awake function of a Manager monobehaviour script, which is automatically spawned in the scene whenever it is saved.
# Instantiation
In case of instantiated objects, please use the MonoBehaviour extension method this.Instantiate_And_AutoAssignVariables() to make sure Auto does the referencing before anyone else starts using that class
# Requisites
All scripts using Auto must have their script execution order delay < 990.
# Installation
As soon as the package is installed, you can already start making use of the Auto Attributes!
# Support
For support, refer to my github page

From the publisher's Asset Store listing.

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2020.3.0f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.