maanizfar / Unity_Utils

Unity Useful extension methods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unity's most useful tools

Object pool

Object Pooling optimizes projects by reusing pre-instantiated GameObjects, reducing CPU burden from repetitive creation and destruction. This design pattern is crucial for top-down shooter games, like Space Shooter, with frequent bullet operations, ensuring smoother gameplay and improved performance. Efficient resource utilization and recycling mechanisms make Object Pooling an essential practice for game developers. Download this unitypackage or go to this folder.

Object.Pool.mp4

Ragdoll

Download this unitypackage or go to this folder.

  • Attach RagdollComponent to your character in Unity.
  • Populate Ragdoll Rigidbodies and Ragdoll Colliders lists in the Inspector.
  • During gameplay, call SetRagdollActive(bool active) to enable or disable ragdoll physics.
Ragdoll.-.LQ.mp4

Inverted Mask

This class can be used to invert a mask in Unity. To use it, simply add this component to your masked object instead of the unity Image component. Here is a package with a sample scene. InverseMask1

Utils

Extension

Extentions contains extensions to make development easier.

Dynamic Shake Animation

ShakeOnTrigger is a shake animation. How it Works:

  1. Attach the ShakeOnTrigger script to your desired GameObject.
  2. Set your preferred values for Shake Duration, Shake Power, and Vibrate Count in the Inspector.
  3. Watch the magic happen! When another collider enters the trigger zone, the object shakes vibrantly, adding a touch of dynamism to your scene.
Shake.Animation.-.LQ.mp4

About

Unity Useful extension methods

License:MIT License


Languages

Language:C# 100.0%