├── .gitignore
├── .idea
└── .idea.Arium
│ ├── .idea
│ ├── encodings.xml
│ ├── indexLayout.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── projectSettingsUpdater.xml
│ └── vcs.xml
│ └── riderModule.iml
├── Assets
├── AriumFramework.meta
├── AriumFramework
│ ├── Arium.cs
│ ├── Arium.cs.meta
│ ├── AriumFramework.asmdef
│ ├── AriumFramework.asmdef.meta
│ ├── AriumObjectTracker.cs
│ ├── AriumObjectTracker.cs.meta
│ ├── Exceptions.meta
│ ├── Exceptions
│ │ ├── ComponentNotFoundException.cs
│ │ ├── ComponentNotFoundException.cs.meta
│ │ ├── GameObjectNotFoundException.cs
│ │ ├── GameObjectNotFoundException.cs.meta
│ │ ├── InteractionNotFoundException.cs
│ │ ├── InteractionNotFoundException.cs.meta
│ │ ├── NullGameObjectException.cs
│ │ └── NullGameObjectException.cs.meta
│ ├── GameObjectWrapper.cs
│ ├── GameObjectWrapper.cs.meta
│ ├── IInteraction.cs
│ ├── IInteraction.cs.meta
│ ├── Interaction.cs
│ ├── Interaction.cs.meta
│ ├── Plugins.meta
│ └── Plugins
│ │ ├── UnityCore.meta
│ │ └── UnityCore
│ │ ├── Extensions.meta
│ │ ├── Extensions
│ │ ├── AnimatorUtils.cs
│ │ ├── AnimatorUtils.cs.meta
│ │ ├── TextUtils.cs
│ │ └── TextUtils.cs.meta
│ │ ├── Interactions.meta
│ │ └── Interactions
│ │ ├── UnityAnimationTrigger.cs
│ │ ├── UnityAnimationTrigger.cs.meta
│ │ ├── UnityDrag.cs
│ │ ├── UnityDrag.cs.meta
│ │ ├── UnityEventSystemInteraction.cs
│ │ ├── UnityEventSystemInteraction.cs.meta
│ │ ├── UnityEventTriggerPointerEnter.cs
│ │ ├── UnityEventTriggerPointerEnter.cs.meta
│ │ ├── UnityEventTriggerPointerExit.cs
│ │ ├── UnityEventTriggerPointerExit.cs.meta
│ │ ├── UnityPointerClick.cs
│ │ ├── UnityPointerClick.cs.meta
│ │ ├── UnityPointerEnter.cs
│ │ ├── UnityPointerEnter.cs.meta
│ │ ├── UnityPointerExit.cs
│ │ ├── UnityPointerExit.cs.meta
│ │ ├── UnityPushObject.cs
│ │ └── UnityPushObject.cs.meta
├── Plugins.meta
├── Samples.meta
└── Samples
│ ├── AriumSample.meta
│ └── AriumSample
│ ├── Animations.meta
│ ├── Animations
│ ├── AnimatorController.controller
│ ├── AnimatorController.controller.meta
│ ├── State1Animation.anim
│ ├── State1Animation.anim.meta
│ ├── State2Animation.anim
│ └── State2Animation.anim.meta
│ ├── Scenes.meta
│ ├── Scenes
│ ├── SampleScene.unity
│ └── SampleScene.unity.meta
│ ├── Scripts.meta
│ ├── Scripts
│ ├── ChangeScript.cs
│ └── ChangeScript.cs.meta
│ ├── Tests.meta
│ └── Tests
│ ├── AriumSampleTests.asmdef
│ ├── AriumSampleTests.asmdef.meta
│ ├── SampleSceneTests.cs
│ └── SampleSceneTests.cs.meta
├── CODE_OF_CONDUCT.md
├── ClassDiagram.jpg
├── LICENSE
├── Logo.png
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NetworkManager.asset
├── Packages
│ └── com.unity.testtools.codecoverage
│ │ └── Settings.json
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
└── VFXManager.asset
├── README.md
├── ThoughtworksLogo.png
└── contributing.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/rider,unity
3 | # Edit at https://www.gitignore.io/?templates=rider,unity
4 |
5 | ### Rider ###
6 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8 |
9 | # User-specific stuff
10 | .idea/**/workspace.xml
11 | .idea/**/tasks.xml
12 | .idea/**/usage.statistics.xml
13 | .idea/**/dictionaries
14 | .idea/**/shelf
15 |
16 | # Generated files
17 | .idea/**/contentModel.xml
18 |
19 | # Sensitive or high-churn files
20 | .idea/**/dataSources/
21 | .idea/**/dataSources.ids
22 | .idea/**/dataSources.local.xml
23 | .idea/**/sqlDataSources.xml
24 | .idea/**/dynamic.xml
25 | .idea/**/uiDesigner.xml
26 | .idea/**/dbnavigator.xml
27 |
28 | # Gradle
29 | .idea/**/gradle.xml
30 | .idea/**/libraries
31 |
32 | # Gradle and Maven with auto-import
33 | # When using Gradle or Maven with auto-import, you should exclude module files,
34 | # since they will be recreated, and may cause churn. Uncomment if using
35 | # auto-import.
36 | # .idea/modules.xml
37 | # .idea/*.iml
38 | # .idea/modules
39 | # *.iml
40 | # *.ipr
41 |
42 | # CMake
43 | cmake-build-*/
44 |
45 | # Mongo Explorer plugin
46 | .idea/**/mongoSettings.xml
47 |
48 | # File-based project format
49 | *.iws
50 |
51 | # IntelliJ
52 | out/
53 |
54 | # mpeltonen/sbt-idea plugin
55 | .idea_modules/
56 |
57 | # JIRA plugin
58 | atlassian-ide-plugin.xml
59 |
60 | # Cursive Clojure plugin
61 | .idea/replstate.xml
62 |
63 | # Crashlytics plugin (for Android Studio and IntelliJ)
64 | com_crashlytics_export_strings.xml
65 | crashlytics.properties
66 | crashlytics-build.properties
67 | fabric.properties
68 |
69 | # Editor-based Rest Client
70 | .idea/httpRequests
71 |
72 | # Android studio 3.1+ serialized cache file
73 | .idea/caches/build_file_checksums.ser
74 |
75 | ### Unity ###
76 | # This .gitignore file should be placed at the root of your Unity project directory
77 | #
78 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
79 | /[Ll]ibrary/
80 | /[Tt]emp/
81 | /[Oo]bj/
82 | /[Bb]uild/
83 | /[Bb]uilds/
84 | /[Ll]ogs/
85 | /[Mm]emoryCaptures/
86 |
87 | # Never ignore Asset meta data
88 | !/[Aa]ssets/**/*.meta
89 | Assets/Plugins/Editor.meta
90 |
91 | # Uncomment this line if you wish to ignore the asset store tools plugin
92 | # /[Aa]ssets/AssetStoreTools*
93 |
94 | # TextMesh Pro files
95 | [Aa]ssets/TextMesh*Pro/
96 | [Aa]ssets/TextMesh*Pro.meta
97 |
98 | # Autogenerated Jetbrains Rider plugin
99 | [Aa]ssets/Plugins/Editor/JetBrains*
100 |
101 | # Visual Studio cache directory
102 | .vs/
103 |
104 | # Gradle cache directory
105 | .gradle/
106 |
107 | # Autogenerated VS/MD/Consulo solution and project files
108 | ExportedObj/
109 | .consulo/
110 | *.csproj
111 | *.unityproj
112 | *.sln
113 | *.suo
114 | *.tmp
115 | *.user
116 | *.userprefs
117 | *.pidb
118 | *.booproj
119 | *.svd
120 | *.pdb
121 | *.mdb
122 | *.opendb
123 | *.VC.db
124 |
125 | # Unity3D generated meta files
126 | *.pidb.meta
127 | *.pdb.meta
128 | *.mdb.meta
129 |
130 | # Unity3D generated file on crash reports
131 | sysinfo.txt
132 |
133 | # Builds
134 | *.apk
135 | *.unitypackage
136 | *.symbols.zip
137 |
138 | # Crashlytics generated file
139 |
140 | # End of https://www.gitignore.io/api/rider,unity
141 |
142 | # MacOS
143 | .DS_Store
144 | *.DS_Store
145 |
146 | # ThinkReality
147 | Assets/ThinkReality
148 | Assets/ThinkReality.meta
149 | Assets/StreamingAssets/Horizon
150 | Assets/StreamingAssets/Horizon.meta
151 | Assets/Sample/Scenes/ThinkRealitySampleScene.unity
152 | Assets/Sample/Scenes/ThinkRealitySampleScene.unity.meta
153 | Assets/Sample/Tests/ThinkRealityTestRunner.cs
154 | Assets/Sample/Tests/ThinkRealityTestRunner.cs.meta
155 | Assets/AriumFramework/Plugins/ThinkReality
156 | Assets/AriumFramework/Plugins/ThinkReality.meta
157 | Assets/Plugins/Android*
158 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Library/PackageCache/com.unity.ads@2.0.8
7 | Library/PackageCache/com.unity.analytics@3.2.2
8 | Library/PackageCache/com.unity.collab-proxy@1.2.15
9 | Library/PackageCache/com.unity.package-manager-ui@2.0.7
10 | Library/PackageCache/com.unity.purchasing@2.0.3
11 | Library/PackageCache/com.unity.textmeshpro@1.3.0
12 | Library/PackageCache/com.unity.xr.windowsmr.metro@1.0.19
13 | Packages
14 | ProjectSettings
15 |
16 |
17 | .git
18 | .idea
19 | Library
20 | Logs
21 | Temp
22 | obj
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/projectSettingsUpdater.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/.idea.Arium/riderModule.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Assets/AriumFramework.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97a388caacf55b74ab97df5e0c0615ff
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/Arium.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using AriumFramework.Exceptions;
4 | using UnityEngine;
5 |
6 | namespace AriumFramework
7 | {
8 | public class Arium
9 | {
10 | private readonly Dictionary _gameObjectCache =
11 | new Dictionary();
12 |
13 | public void PerformAction(IInteraction interaction, string gameObjectName)
14 | {
15 | PerformAction(interaction, FindGameObject(gameObjectName));
16 | }
17 |
18 | public void PerformAction(IInteraction interaction, GameObject gameObject)
19 | {
20 | if (interaction == null)
21 | throw new ArgumentNullException();
22 |
23 | interaction.PerformAction(gameObject);
24 | }
25 |
26 | public T GetComponent(string gameObjectName) where T : Component
27 | {
28 | return new GameObjectWrapper(FindGameObject(gameObjectName)).GetComponent();
29 | }
30 |
31 | public GameObject FindGameObject(string gameObjectName, bool includeInactive = false)
32 | {
33 | try
34 | {
35 | if (!_gameObjectCache.ContainsKey(gameObjectName))
36 | {
37 | GameObjectWrapper wrapper = new GameObjectWrapper(gameObjectName,includeInactive);
38 | wrapper.AddTracker(RemoveObjectFromCache);
39 | _gameObjectCache.Add(gameObjectName, wrapper.GetObject());
40 | }
41 |
42 | return _gameObjectCache[gameObjectName];
43 | }
44 | catch (Exception e)
45 | {
46 | Console.WriteLine(e + " Could not Find GameObject");
47 | throw;
48 | }
49 | }
50 |
51 | private void RemoveObjectFromCache(string key)
52 | {
53 | _gameObjectCache.Remove(key);
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Arium.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 69207f01abf84ac7b2511ca8899f3e0d
3 | timeCreated: 1583564823
--------------------------------------------------------------------------------
/Assets/AriumFramework/AriumFramework.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "AriumFramework"
3 | }
4 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/AriumFramework.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 074f34a3b59dbbd48b6be57a7ffb60f2
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/AriumObjectTracker.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.Events;
3 |
4 | namespace AriumFramework
5 | {
6 | public class AriumObjectTracker : MonoBehaviour
7 | {
8 | private UnityAction _onObjectDestroy;
9 |
10 | internal void Initialize(UnityAction onObjectDestroy)
11 | {
12 | _onObjectDestroy = onObjectDestroy;
13 | }
14 |
15 | private void OnDestroy()
16 | {
17 | _onObjectDestroy?.Invoke();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/AriumObjectTracker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 060e541276834594ad355267a8b1cfba
3 | timeCreated: 1597337785
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 194ca41d8e36440f84fb9fa3b1914fee
3 | timeCreated: 1583579897
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/ComponentNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace AriumFramework.Exceptions
5 | {
6 | public class ComponentNotFoundException : Exception
7 | {
8 | public ComponentNotFoundException(GameObject gameObject, Type type) : base(
9 | type + " component not found in " + gameObject.name)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/ComponentNotFoundException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e72763bf8d8b4bb28ec692e20cafbad1
3 | timeCreated: 1583580117
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/GameObjectNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AriumFramework.Exceptions
4 | {
5 | public class GameObjectNotFoundException : Exception
6 | {
7 | public GameObjectNotFoundException(string gameObjectName) : base("GameObject " + gameObjectName + " not found")
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/GameObjectNotFoundException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8946f22dce444056a198b0917c401121
3 | timeCreated: 1583579912
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/InteractionNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AriumFramework.Exceptions
4 | {
5 | public class InteractionNotFoundException : Exception
6 | {
7 | public InteractionNotFoundException(Type type) : base("Interaction " + type + " not specified or found")
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/InteractionNotFoundException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e163b2e013a46ec9cabfd8638d59147
3 | timeCreated: 1584185997
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/NullGameObjectException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AriumFramework.Exceptions
4 | {
5 | public class NullGameObjectException : Exception
6 | {
7 | public NullGameObjectException() : base("GameObject provided is null")
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Exceptions/NullGameObjectException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 29ee9aac300e43ec8f73357c3e20ebdb
3 | timeCreated: 1633613805
--------------------------------------------------------------------------------
/Assets/AriumFramework/GameObjectWrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AriumFramework.Exceptions;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace AriumFramework
8 | {
9 | internal class GameObjectWrapper
10 | {
11 | private readonly GameObject _currentGameObject;
12 | private readonly string _originalName;
13 |
14 | internal GameObjectWrapper(string gameObjectName, bool includeInactive = false)
15 | {
16 | _originalName = gameObjectName;
17 | if (string.IsNullOrEmpty(_originalName))
18 | throw new ArgumentException("Empty game object name");
19 |
20 | _currentGameObject = UnityEngine.Object.FindObjectsOfType(includeInactive).
21 | FirstOrDefault(gameObject => gameObject.name == gameObjectName);
22 |
23 | if (_currentGameObject == null)
24 | {
25 | throw new GameObjectNotFoundException(_originalName);
26 | }
27 | }
28 |
29 | internal GameObjectWrapper(GameObject gameObject)
30 | {
31 | if (gameObject == null) throw new ArgumentNullException();
32 |
33 | _currentGameObject = gameObject;
34 | }
35 |
36 | internal void AddTracker(UnityAction onDestroy)
37 | {
38 | AriumObjectTracker tracker = _currentGameObject.AddComponent();
39 | if (tracker == null)
40 | tracker = _currentGameObject.GetComponent();
41 |
42 | tracker.Initialize(() => onDestroy?.Invoke(_originalName));
43 | }
44 |
45 | public T GetComponent()
46 | {
47 | T component = _currentGameObject.GetComponent();
48 |
49 | if (component == null)
50 | {
51 | throw new ComponentNotFoundException(GetObject(), typeof(T));
52 | }
53 |
54 | return component;
55 | }
56 |
57 | public override string ToString()
58 | {
59 | return _currentGameObject.scene + " --- " + _currentGameObject.name;
60 | }
61 |
62 | public GameObject GetObject()
63 | {
64 | return _currentGameObject;
65 | }
66 | }
67 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/GameObjectWrapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc268ad8d9c83ba45aae10612ea028df
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/IInteraction.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace AriumFramework
4 | {
5 | public interface IInteraction
6 | {
7 | void PerformAction(GameObject gameObject);
8 | }
9 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/IInteraction.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d15326e84f6d4b78b77ee0408a1323bb
3 | timeCreated: 1583564187
--------------------------------------------------------------------------------
/Assets/AriumFramework/Interaction.cs:
--------------------------------------------------------------------------------
1 | using AriumFramework.Exceptions;
2 | using UnityEngine;
3 | using UnityEngine.Events;
4 |
5 | namespace AriumFramework
6 | {
7 | public abstract class Interaction : IInteraction
8 | {
9 | private UnityAction _action;
10 |
11 | protected Interaction(UnityAction action)
12 | {
13 | _action = action;
14 | }
15 |
16 | protected Interaction()
17 | {
18 | }
19 |
20 | protected void SetAction(UnityAction action)
21 | {
22 | _action = action;
23 | }
24 |
25 | public void PerformAction(GameObject gameObject)
26 | {
27 | var components = gameObject.GetComponents();
28 |
29 | if (components.Length == 0)
30 | {
31 | throw new ComponentNotFoundException(gameObject, typeof(T));
32 | }
33 |
34 | foreach (var component in components)
35 | {
36 | _action?.Invoke(component);
37 | }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Interaction.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d2571dbce263e444ab4c17d9900387e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a150de97c197024fa0319f15d74b75c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins/UnityCore.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7e04f810d588be4b9f6f81d955dd171
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins/UnityCore/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd05074854c0446caf5ff16dd43867b1
3 | timeCreated: 1584186772
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins/UnityCore/Extensions/AnimatorUtils.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace AriumFramework.Plugins.UnityCore.Extensions
4 | {
5 | public static class AnimatorUtils
6 | {
7 | public static bool IsInAnimationState(this GameObject gameObject, string animationState,
8 | int layerIndex = 0)
9 | {
10 | return new GameObjectWrapper(gameObject).GetComponent().GetCurrentAnimatorStateInfo(layerIndex).IsName(animationState);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins/UnityCore/Extensions/AnimatorUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8d8771c199824c03a3c59581b131a7b2
3 | timeCreated: 1584178609
--------------------------------------------------------------------------------
/Assets/AriumFramework/Plugins/UnityCore/Extensions/TextUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | namespace AriumFramework.Plugins.UnityCore.Extensions
6 | {
7 | public static class TextUtils
8 | {
9 | public static string GetText(this GameObject gameObject)
10 | {
11 | return new GameObjectWrapper(gameObject).GetComponent().text;
12 | }
13 | public static bool IsGameObejectColliderEnabled(this GameObject gameObject)
14 | {
15 | return new GameObjectWrapper(gameObject).GetComponent().enabled;
16 | }
17 |
18 | public static string GetImageSourceName(this GameObject gameObject)
19 | {
20 | return new GameObjectWrapper(gameObject).GetComponent().sprite.name;
21 | }
22 |
23 | public static float GetGameObjectWidth(this GameObject gameObject)
24 | {
25 | return GetGameObjectSize(gameObject).width;
26 | }
27 |
28 | public static float GetGameObjectHeight(this GameObject gameObject)
29 | {
30 | return GetGameObjectSize(gameObject).height;
31 | }
32 |
33 | public static Rect GetGameObjectSize(GameObject gameObject)
34 | {
35 | return gameObject.GetComponent().rect;
36 | }
37 |
38 | public static Boolean IsGameObjectInteractable(GameObject gameObject)
39 | {
40 | return gameObject.GetComponent