{"id":13661828,"url":"https://github.com/Bodix/Evolunity","last_synced_at":"2025-04-25T03:31:28.815Z","repository":{"id":53124611,"uuid":"321329340","full_name":"Bodix/Evolunity","owner":"Bodix","description":"Well-designed package with useful scripting tools for Unity development​","archived":false,"fork":false,"pushed_at":"2024-02-29T00:37:46.000Z","size":910,"stargazers_count":52,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T03:15:03.923Z","etag":null,"topics":["asset","csharp","extensions","library","package","productivity","scripting","scripts","scripts-collection","tool","toolkit","tools","unity","unity-development","unity-editor","unity3d","utilities","utilities-library","utility","utility-library"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bodix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-14T11:38:35.000Z","updated_at":"2024-02-29T03:02:51.000Z","dependencies_parsed_at":"2024-01-14T15:23:16.022Z","dependency_job_id":"1eff41d0-6c22-4ae1-803e-45bf8cb617ca","html_url":"https://github.com/Bodix/Evolunity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodix%2FEvolunity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodix%2FEvolunity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodix%2FEvolunity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodix%2FEvolunity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bodix","download_url":"https://codeload.github.com/Bodix/Evolunity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250747814,"owners_count":21480723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asset","csharp","extensions","library","package","productivity","scripting","scripts","scripts-collection","tool","toolkit","tools","unity","unity-development","unity-editor","unity3d","utilities","utilities-library","utility","utility-library"],"created_at":"2024-08-02T05:01:42.392Z","updated_at":"2025-04-25T03:31:27.155Z","avatar_url":"https://github.com/Bodix.png","language":"C#","readme":"# 🌿 Evolunity\n\n![Unity version](https://img.shields.io/badge/unity-2018.4%2B-blue?logo=unity)\n[![License](https://img.shields.io/badge/license-CC%20BY--ND%204.0-green)](#license)\n\nWell-designed package with useful scripting tools for Unity development.\n\n## Cheatsheet\n\n### Coroutines\n\n```csharp\n// Calls the function in the next frame.\nDelay.ForOneFrame(() =\u003e Debug.Log(\"Hello in the next frame\"));\n// Calls the function after a N of seconds.\nDelay.ForSeconds(3, () =\u003e Debug.Log(\"Hello after three seconds\"));\n// Calls the function after a N of frames.\nDelay.ForFrames(300, () =\u003e Debug.Log(\"Hello after three hundred frames\"));\n\n// Calls the function periodically every N seconds.\nRepeat.EverySeconds(1, () =\u003e Debug.Log(\"Hello every second\"));\n// Calls the function periodically every N frames.\nRepeat.EveryFrames(10, () =\u003e Debug.Log(\"Hello every ten frames\"));\n// Calls the function periodically every frame.\n// Analogous to \"Update\", but you can use it not only from MonoBehaviour classes.\nRepeat.EveryFrame(() =\u003e Debug.Log(\"Hello every frame\"));\n\n// Starts a static coroutine. You can use this outside of MonoBehaviour.\nStaticCoroutine.Start(SomeCoroutine());\n\n// You can cache a coroutine instance and stop it at any time.\nCoroutine delayCoroutine = Delay.ForSeconds(60, () =\u003e Debug.Log(\"Delay coroutine\"));\nCoroutine repeatCoroutine = Repeat.EverySeconds(60, () =\u003e Debug.Log(\"Repeat coroutine\"));\nCoroutine staticCoroutine = StaticCoroutine.Start(SomeCoroutine());\n// To stop a cached coroutine instance use StaticCoroutine.Stop method.\n// See the description of the StaticCoroutine.Stop method for details.\nStaticCoroutine.Stop(delayCoroutine);\nStaticCoroutine.Stop(repeatCoroutine);\nStaticCoroutine.Stop(staticCoroutine);\n\n// You can specify the MonoBehaviour instance on which to execute the coroutine.\nExampleBehaviour exampleBehaviour = GetComponent\u003cExampleBehaviour\u003e();\nCoroutine delayCoroutine2 = Delay.ForSeconds(60, () =\u003e Debug.Log(\"Delay coroutine\"), exampleBehaviour);\nCoroutine repeatCoroutine2 = Repeat.EverySeconds(60, () =\u003e Debug.Log(\"Repeat coroutine\"), this);\n// In this case, you can stop the coroutine as usual.\nexampleBehaviour.StopCoroutine(delayCoroutine2);\nthis.StopCoroutine(repeatCoroutine2);\n```\n\n### IEnumerable Extensions\n\n```csharp\nGameObject[] objects =\n{\n    new GameObject(\"Cube\"),\n    new GameObject(\"Sphere\"),\n    new GameObject(\"Cone\")\n};\n\n// Output the array to the console.\n// Output: Cone (UnityEngine.GameObject), Sphere (UnityEngine.GameObject), Cube (UnityEngine.GameObject)\nDebug.Log(objects.AsString());\n// Output the array to the console by specifying the string selector and separator.\n// Output: Cone : Sphere : Cube\nDebug.Log(objects.AsString(item =\u003e item.name, \" : \"));\n\n// Get random object from the array.\nGameObject randomObj = objects.Random();\n\n// Shuffle the array.\nobjects = objects.Shuffle().ToArray();\n\n// Remove duplicates from the array.\nobjects = objects.RemoveDuplicates().ToArray();\n\n// ForEach as extension method.\nobjects.ForEach(Debug.Log);\nobjects.ForEach((x, index) =\u003e Debug.Log(index + \" : \" + x.name + \", \"));\n// ForEach as extension method with lazy execution.\nobjects.ForEachLazy(Debug.Log);\nobjects.ForEachLazy((x, index) =\u003e Debug.Log(index + \" : \" + x.name + \", \"));\n```\n\n\u003e Cheatsheet still WIP\n\n## Content\n\n### Utilities\n\n- `StaticCoroutine` - Static coroutine.\n- `Delay` - Utility for calling functions with a delay. Based on `StaticCoroutine`.\n- `Screenshot` - Utility for quick and easy screenshots.\n- `Performance` - Utility for measuring functions performance.\n- `BinarySerializer` - Utility for serializing objects.\n- `StringEncryptor` - Utility for encrypting strings.\n- `Enum` - Utility for parsing and working with enums.\n- `Angle` - Utility for working with angles.\n- `MathUtilities` - Math utilities.\n- `RegexPatterns` - Set of default regular expression patterns.\n- `Validate` - Utility for validating various things.\n- `WrappedCoroutine` - Coroutine, which contains useful data and functions for the job.\n\n### Unity components\n\n- `PeriodicBehaviour` - Calls the given function periodically.\n- `Spawner` - Spawns objects one-time or periodically. Based on `PeriodicBehaviour`.\n- `InputReader` - Reads click, drag and zoom (cross-platform).\n- `LongPressReader` - Reads long press (cross-platform).\n- `GifImage` - Plays an array of sprites like a gif.\n- `FPSCounter` - Counts FPS and outputs it to the `Text` component.\n- `Comment` - Contains a comment to the GameObject.\n- `DevelopmentOnly` - Destroys/disable the object if the *DEVELOPMENT* define is not set in the project settings.\n- `PlatformDependent` - Destroys/disable the object if the platform specified in it does not match the current one.\n- `DontDestroyOnLoad` - Makes GameObject persistent.\n- `SingletonBehaviour` - Singleton `MonoBehaviour`.\n\n### Editor\n\n- `UnityConstantsGenerator` - Tool for generating static classes with tags, layers, scenes, and input axes.\n- `CameraScreenshot` - Tool for taking screenshot from the main camera.\n- `MenuItems` - Useful menu items.\n- `Config` - Editor window with different project settings (e.g., target frame rate).\n- `LayerDrawer` - Property drawer for `LayerAttribute` that shows a popup with layers (not mask).\n- `Define` - Defines management.\n- `EditorConsole` - Utility for working with the Editor console.\n- `OpenInFileManager` - Utility to open the given path in the file manager.\n\n### Structs\n\n- `Direction` - Direction given by vector.\n- `FloatRange` - Range given by two floats.\n- `IntRange` - Range given by two ints.\n\n### Other\n\n- `Singleton` - [POCO](https://ru.wikipedia.org/wiki/Plain_old_CLR_object) singleton.\n- `StateMachine` - Immutable state machine without using strings, enums or reflections.\n- `WeightQueue` - Queue filled with elements in which the number of each element is determined by its weight.\n\n### Extension methods\n\n- System types:\n  - `T[]`\n  - `byte[]`\n  - `char`\n  - `IComparable`\n  - `IDictionary`\n  - `IEnumerable`\n  - `string`\n\n- Unity types:\n  - `Animator`\n  - `Color`\n  - `Graphic`\n  - `LayerMask`\n  - `MonoBehaviour`\n  - `Object`\n  - `Quaternion`\n  - `Rect`\n  - `RectTransform`\n  - `Renderer`\n  - `Texture`\n  - `ToggleGroup`\n  - `Transform`\n  - `UnityWebRequest`\n  - `Vector`\n\n## Dependencies\n\n- [NaughtyAttributes](https://github.com/dbrizov/NaughtyAttributes)\n\n## Warning\n\nEvolunity may receive breaking changes, so be sure to make a backup before updating the package.\n\n## Install\n\n- **Unity 2019.3 and above:**\n\n  Use the following URL in the **Package Manager**:\n  `https://github.com/Bodix/Evolunity.git`\n\n  [Manual](https://docs.unity3d.com/2019.3/Documentation/Manual/upm-ui-giturl.html)\n\n- **Before Unity 2019.3:**\n\n  Open `{ProjectFolder}/Packages/manifest.json` and add the following line:\n\n    ```json\n    {\n      \"dependencies\":\n      {\n        \"com.evolutex.evolunity\": \"https://github.com/Bodix/Evolunity.git\",\n        ...\n      }\n    }\n    ```\n\n## Requirements\n\n- Unity 2018.4+\u003cbr\u003e\n  *(You can try the lower version, but I haven't tested that)*\n\n- Git\u003cbr\u003e\n  *(Must be added to the **PATH** environment variable)*\n\n## License\n\n[**CC BY-ND 4.0**](https://creativecommons.org/licenses/by-nd/4.0/)\n\n1. **You can use this package in commercial projects.**\n\n2. You can modify or extend this package only for your own use but you can't distribute the modified version.\n    \u003e**Note:** You can submit a pull request to this repository and if your change is useful, I'll be sure to add it!\n\n3. You must indicate the author.\n    \u003e**Note:** You don't need to take any action on this point, because all attributions are written at the head of the scripts!\n","funding_links":[],"categories":["Open Source Repositories","C\\#"],"sub_categories":["Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBodix%2FEvolunity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBodix%2FEvolunity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBodix%2FEvolunity/lists"}