close
Skip to content

Repository files navigation

Image

Image Image Image

Social

Local Discussions on github.
Unity Discussions.

Also you can Tweet about it.

About

The package is a set of C# utility code stuff for projects based on Unity Engine.
It works with Unity 2019.4 and newer.

Usage

For using the library as a unity package add the next line to dependencies in \Packages\manifest.json:

"com.oleghcp.unitytools": "https://github.com/oleghcp/UnityTools.git",

Also it can be downloaded manually from github and placed into the assets folder.

Mind that it uses assembly definitions.

Code Overview

Runtime Code

  • Base stuff. Common tools: ApplicationUtility, BitMask, RandomNumberGenerator, CameraFitter, etc.
  • Coroutine running. Allows to run coroutines in non-MonoBehaviour classes.
  • Collections. Some specific collections.
  • .Net Extensions. Extensions for base .Net api stuff (arrays, collections, strings, etc).
  • Unity Extensions. Extensions for base Unity api stuff (game objects, transforms, vectors, etc).
  • Terminal. Simple in-game console for commands and messages.
  • Inspector. Attribute classes for Unity inspector.
  • Input/Output. A few classes for work with files and paths.
  • Mathematics. Math tools and structs.
  • Graph editor. Tool for creating graphs based on linked nodes. Useful for creating dialogues.
  • Numeric entities. Structs and classes for work with numeric parameters like ranges or character stats.
  • Path finding. Simple implementation of A* pathfinding or something that pretends to be A*.
  • ObjectPool. ObjectPool implementation.
  • SignalBus. SignalBus implementation.
  • ServiceLocator. ServiceLocator implementation.
  • PostProcessing. Fog effect for the built-in render pipeline
  • Randomization. Custom random number generators.
  • Game saving. Save/load system.
  • Projectiles. Projectile implementation.
  • Singletons. Singletons based on MonoBehaviour and ScriptableObject.
  • Strings. Alphanumeric sorting.
  • Timer. Simple timer.
  • Tools. Couple of tool classes.

Editor Code

Editor Stuff Overview

Preferences

Image

Base Menu

Image

Menu Item Description
Tools/OlegHcp/Addressables/Analysis Results Converts analysis results from bundle-duplicates to duplicate-bundles. Image
Tools/OlegHcp/Assets/Create Scriptable Object Asset Allows to create assets based on ScriptableObject without CreateAssetMenuAttribute. Image
Tools/OlegHcp/Assets/Find Asset By Guid Asset searching by guid.
Tools/OlegHcp/Assets/Meshes/ Creates simple mesh assets using mesh generating.
Tools/OlegHcp/CaptureScreen/ Creates screenshots and saves them to a file.
Tools/OlegHcp/Code/Generate Layer Set Class Allows to generate static class with layer and mask constants. Image
Tools/OlegHcp/Files/Convert Code Files to UTF8 Converts project code files to UTF8 including shaders.
Tools/OlegHcp/Files/Convert Text Files to UTF8 Converts all text files to UTF8 including code files.
Tools/OlegHcp/Files/Find Huge Files Searches files by given size.
Tools/OlegHcp/Folders/Open Project Folder Opens folder where the project is located.
Tools/OlegHcp/Folders/Open Persistent Data Folder Opens folder which is located at Application.persistentDataPath.
Tools/OlegHcp/Folders/Remove Empty Folders Removes empty folders within Assets folder.
Tools/OlegHcp/Misc/Generate GUID Generates new GUID and outputs it to the console.
Tools/OlegHcp/Misc/Create csc.rsp Creates csc.rsp file with precreated compiler arguments.

Custom Transform Editor

Has quick reset buttons and can be switched between local and world view.
Has indicators of tool handles if they are switched to center and global value. Transform parameters can be copied to the clipboard as json string.

Image Image Image Image

Custom MeshRenderer Editor

Image

Custom AnimationClip Editor

Image

Asset Context Menu

  • Order Children. Sorts siblings by name.

Image Image

  • Create Script From Template. Template can be modified: \your_project\UserSettings\Templates\C#ScriptTemplate.cs.txt.

Image

  • Show Asset Guid

Image

  • Find References In Project. The search via text also finds addressable references.

Image

  • Create Asset Based On ScriptableObject

Image Image

  • Destroy Subasset

Image

License

This package is released under the MIT license.


I hope my humble package becomes a useful tool for your game development work and makes it more convenient.

Releases

Packages

Contributors

Languages