/Unity_Utils

Unity Useful extension methods

Primary LanguageC#MIT LicenseMIT

Unity's most useful tools

Installation

Download and import this unity package into your project.

Package Content

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.

Object.Pool.mp4

Ragdoll

Download and import this unity package into your project.

  • 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. InverseMask1

Flying Objects in UI

This repository contains a Unity utility script for adding captivating flying coin animations to your user interface elements. The script utilizes the powerful DoTween library to create smooth and engaging animations that can enhance the visual appeal of your UI.

Collect.Dotween.-.LQ.mp4

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