unity-atoms/Packages/Core/Runtime/Utils/Runtime.cs

34 lines
1.1 KiB
C#
Raw Normal View History

2020-03-01 20:26:06 -05:00
namespace UnityAtoms
2019-09-27 12:08:18 -04:00
{
/// <summary>
/// Internal constant and static readonly members for runtime usage.
/// </summary>
2019-10-01 11:27:22 -04:00
public static class Runtime
2019-09-27 12:08:18 -04:00
{
2019-10-14 20:08:41 -04:00
/// <summary>
/// Runtime constants
/// </summary>
2019-10-01 11:27:22 -04:00
public static class Constants
2019-09-27 12:08:18 -04:00
{
/// <summary>
2019-10-15 16:02:44 -04:00
/// Prefix that should be pre-pended to all Debug.Logs made from UnityAtoms to help immediately inform a user that those logs are made from this library.
2019-09-27 12:08:18 -04:00
/// </summary>
public const string LOG_PREFIX = "UnityAtoms :: ";
}
2019-10-15 16:02:44 -04:00
Added Variable Instancer, Event Reference, Atom Collection and Atom List (old Atom List renamed to Atom Value List) (#110) AtomVariableInstancer - Added AtomVariableInstancer as an option to AtomReference. - Added AtomVariableInstancer to generator. - Added editor icon for AtomVariableInstancer. AtomEventReference - Added an AtomEventReference class (and AtomEventX2Reference). It’s similar to an AtomReference, but for Events. Let’s you pick between an Event, Variable (will select the Changed event) and a VariableInstancer (see above). - Added AtomEventReference and AtomEventX2Reference to generator. - Added a drawer for AtomEventReference. - Listeners are now using AtomEventReference instead of AtomEvent. - Refactoring of VoidHooks since Listeners are now using AtomEventReference. AtomCollection - Created an AtomCollection - a collection of Atoms associated with key strings (AtomReferences). - Added new editor icon for collections. - Created a SerializableDictionary class, which AtomCollection is using. - Custom property drawer for SerializableDictionary. - SerializableDictionary supports nested structures meaning that a AtomCollection can have a KVP that is pointing to another AtomCollection. - AtomCollections have 3 events: Added, Removed, Cleared. - Added an option to sync an InstanceVariable to collection - adding it to the collection when created (using gameObject’s instance id as key) and removing it from the collection when destroyed. AtomList - Renamed old AtomList to AtomValueList - Added AtomList, like Collection, but a list - Added new icon for AtomList - Created a AtomBaseVariableList class, which AtomList is using. - Custom property drawer for AtomBaseVariableList. - AtomLists have 3 events: Added, Removed, Cleared. - Added an option to sync an InstanceVariable to list - adding it to the list when created and removing it from the list when destroyed.
2020-02-22 20:39:43 -05:00
public static class ExecutionOrder
{
public const int VARIABLE_INSTANCER = -100;
}
2019-10-15 16:02:44 -04:00
/// <summary>
/// Determine if we are working the Unity Atoms source library / repo or not.
/// </summary>
/// <returns>`true` if we are working in the Unity Atoms source library / repo, otherwise `false`.</returns>
public static bool IsUnityAtomsRepo
{
get => System.Environment.CurrentDirectory.Contains("unity-atoms/Examples");
}
2019-09-27 12:08:18 -04:00
}
}