This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using UnityEngine; | |
| using UnityEngine.SceneManagement; | |
| public class Unity_ScreenHelper : MonoBehaviour | |
| { | |
| // Here is container with scenes. | |
| // Assuming that SceneName property of element | |
| // contains name of scene. | |
| // IMPORTANT: add scene to build first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.Events; | |
| using UnityEngine.UI; | |
| public static class UIElements | |
| { | |
| /// <summary> | |
| /// Creates layout element and sets the corresponding | |
| /// size values to the members if | |
| /// those values does not equal 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class MathL | |
| { | |
| /// <summary> | |
| /// Sets value from min to max, when value exceeds min, then it is set to max and vice versa | |
| /// </summary> | |
| public static int Loop(int value, int min, int max) | |
| { | |
| if (value < min) value = max; | |
| else if (value > max) value = min; | |
| return value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEditor; | |
| public static class Unity__GetAssets | |
| { | |
| /// <summary>Return unfiltered list of objects of type T, gets from default path.</summary> | |
| /// <returns>Array of objects of type T where T is type of UnityEngine.Object</returns> | |
| public static List<T> GetAssets<T>() where T : UnityEngine.Object | |
| { | |
| List<T> assets = new List<T>(); | |
| string[] AssetsGUID = AssetDatabase.FindAssets($"t:{typeof(T).Name}"); |