Small Hedge Games
Small Hedge Games
  • 21
  • 48 381
Create FAKE SHADOWS using JUST MESHES (BIG Unity Tool Update)
Mesh Wrapper is a Unity Tool that now allows you to create Fake Shadows at Runtime!
Take a Squiz!
buymeacoffee.com/SmallHedgeHQ/e/266922
Support me :) - buymeacoffee.com/smallhedgehq
Website - www.smallhedge.com/
My games - small-hedge.itch.io
Twitter - SmallHedgeHQ
Facebook - SmallHedgeHQ
UA-cam avatar created by OliGalArt, go check her out! ko-fi.com/oligalart/commissions
Переглядів: 152

Відео

18 BRAND NEW Post Processing Combinations in Unity!
Переглядів 772Місяць тому
Use bloom, lens distortion, colour grading, and chromatic aberation to make creative effects for your projects! These tools are designed for the built-in render pipeline but can also be altered to work with the universal render pipeline (URP) and high definition render pipeline (HDRP). Github link to the tools used in the video! github.com/SmallHedge/PostProcessingTools Support me :) - buymeaco...
Create Rooms Faster than PROBUILDER - NEW Unity Tool (2024)
Переглядів 4732 місяці тому
Room Builder is a Unity tool which allows you to create rooms in you Unity scene! Take a squiz! buymeacoffee.com/SmallHedgeHQ/e/268119 Support me :) - buymeacoffee.com/smallhedgehq Website - www.smallhedge.com/ My games - small-hedge.itch.io Twitter - SmallHedgeHQ Facebook - SmallHedgeHQ UA-cam avatar created by OliGalArt, go check her out! ko-fi.com/oligalart/commissions
The ULTIMATE Guide to 2D CAMERAS (Updated 2024)
Переглядів 2162 місяці тому
Camera shake, dead zones, and camera boundaries can all be done through the Unity inspector through cinemachine! Not sure why we haven't all converted sooner! Code Used: github.com/SmallHedge/CinemachineCameraShake Get Light Flicker Ultimate: assetstore.unity.com/packages/tools/particles-effects/light-flicker-ultimate-268609 You might like: Unity Sound Manager - ua-cam.com/video/g5WT91Sn3hg/v-d...
Wrap Meshes around OTHER Meshes! NEW Unity Tool (2024)
Переглядів 2062 місяці тому
Mesh Wrapper is a Unity Tool which allows you to create decals! Take a Squiz! buymeacoffee.com/SmallHedgeHQ/e/266922 Support me :) - buymeacoffee.com/smallhedgehq Website - www.smallhedge.com/ My games - small-hedge.itch.io Twitter - SmallHedgeHQ Facebook - SmallHedgeHQ UA-cam avatar created by OliGalArt, go check her out! ko-fi.com/oligalart/commissions
Create MAP BOUNDARIES in 2 seconds with this NEW Unity Tool (2024)
Переглядів 5982 місяці тому
Easy Boundary is a Unity tool which allows you to create perimeters in you Unity scene! Take a squiz! buymeacoffee.com/SmallHedgeHQ/e/265667 Support me :) - buymeacoffee.com/smallhedgehq Website - www.smallhedge.com/ My games - small-hedge.itch.io Twitter - SmallHedgeHQ Facebook - SmallHedgeHQ UA-cam avatar created by OliGalArt, go check her out! ko-fi.com/oligalart/com...
UNITY DEVELOPER takes on their OWN GAME!
Переглядів 1512 місяці тому
Uproot is a rougelike 2d platformer where you must collect coins around the map while avoiding enemies and hazards! Purchase upgrades to level up your character to beat the harder waves! PLAY UPROOT: small-hedge.itch.io/uproot ua-cam.com/video/wQiAOPZJcSc/v-deo.html ua-cam.com/video/yRKjNPNeQX0/v-deo.html HUGE SHOUTOUTS! Programming: Small Hedge (www.youtube.com/@SmallHedgeHQ) Game Art: Oligala...
Create 2D PARALLAX with ONE CLICK - Free Unity Plugin Showcase
Переглядів 4024 місяці тому
Having to code new 2D Parallax effect scripts can be a hassle. So here is a Unity plugin which creates 2D parallax instantly by adding this one script! Hope this helps! Github Code: github.com/SmallHedge/2dParallax LIGHT FLICKER ULTIMATE assetstore.unity.com/packages/tools/particles-effects/light-flicker-ultimate-268609 Assets Showcased: LIGHT FLICKER: assetstore.unity.com/packages/tools/partic...
PLEASE use a Unity SOUND MANAGER! - Full Tutorial
Переглядів 7 тис.4 місяці тому
Sound Managers are crucial when using audio sources in Unity. It really helps to organise your sound events in a structured way! Github Code: github.com/SmallHedge/SoundManager LIGHT FLICKER ULTIMATE assetstore.unity.com/packages/tools/particles-effects/light-flicker-ultimate-268609 Assets Showcased: LIGHT FLICKER: assetstore.unity.com/packages/tools/particles-effects/light-flicker-ultimate-268...
Say Goodbye to the Animator! NEW Unity Plugin Showcase
Переглядів 11 тис.5 місяців тому
AnimatorCoder is a new Unity plugin which allows you to play animations entirely from script. It also includes animation parameters and animation chaining. Thanks everyone for your amazing input into this project! Download the plugin! github.com/SmallHedge/AnimatorCoder Assets Showcased: BACKGROUND: assetstore.unity.com/packages/2d/textures-materials/nature/free-pixel-art-hill-133118 WIZARD: as...
Never use the Unity Animator EVER AGAIN - Full Guide
Переглядів 8 тис.5 місяців тому
Tutorial of how to manage animations entirely through script in the Unity game engine! Tired of struggling with the Unity Animator? In this tutorial, I'll show you how to create smooth and efficient animations entirely through scripting, eliminating the need for the Unity Animator once and for all! Say goodbye to clunky animations and hello to smooth, customizable movements in your Unity projec...
Creating 2D Worlds with PROCEDURAL GENERATION - Devlog
Переглядів 2405 місяців тому
Procedural Generation is a popular choice for indie games such as rougelikes, open-world, and sandbox games. Now it's time to add it to 2d platforming, where the entire world is procedurally generated... Support me :) - buymeacoffee.com/smallhedgehq Website - www.smallhedge.com/ My games - small-hedge.itch.io Twitter - SmallHedgeHQ Facebook - SmallHedgeHQ UA-cam avatar ...
Light Flicker Ultimate - Now Available on Unity Asset Store
Переглядів 1755 місяців тому
Get on the Asset Store! 50% OFF assetstore.unity.com/packages/tools/particles-effects/light-flicker-ultimate-268609 Tutorial Video: ua-cam.com/video/6WmJpudXUa0/v-deo.html Have complete customisation of your light flickers! This asset includes the standard features of light flickering such as light intensity, light colour, material switching, and sound. Why stop there? Light Flicker Ultimate ad...
Don't use the Unity Animator, Use Code Instead! - Tutorial
Переглядів 16 тис.6 місяців тому
Unity developers often create messy animator tabs. Animating like a programmer allows you to clean it up, and have more control of your animations. This is how to set up your animations in any project. Assets Showcased: ENVIRONMENT: assetstore.unity.com/packages/3d/environments/platformer-game-show-pack-195080 POST PROCESSING: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/...
What Developers DONT TELL YOU about 2d Platformers
Переглядів 4376 місяців тому
Wonder how games like Hollow Knight, Ori, and Celeste have such good character controllers? Here are 9 tips to help you out in your game development journey! Assets Showcased: FULLSCREEN: assetstore.unity.com/packages/tools/utilities/fullscreen-editor-69534 2D: assetstore.unity.com/packages/2d/characters/sunny-land-forest-108124 Support me :) - buymeacoffee.com/smallhedgehq Website - www.smallh...
This is the EASIEST Way to Create FLAPPY BIRD
Переглядів 7657 місяців тому
This is the EASIEST Way to Create FLAPPY BIRD
Adding ENEMIES to my INDIE Game - Devlog
Переглядів 2017 місяців тому
Adding ENEMIES to my INDIE Game - Devlog
Making a Particle System in C++ from Scratch!
Переглядів 2492 роки тому
Making a Particle System in C from Scratch!
How does a 2D CAMERA actually work?
Переглядів 3162 роки тому
How does a 2D CAMERA actually work?
Coding COLLISIONS in C++ from Scratch!
Переглядів 1272 роки тому
Coding COLLISIONS in C from Scratch!
Create YOUR OWN ENTITY in C++
Переглядів 1062 роки тому
Create YOUR OWN ENTITY in C

КОМЕНТАРІ

  • @ernestsubotic8587
    @ernestsubotic8587 20 годин тому

    My favorite part about this video is when he says "that's literally all we need" and then proceeds to type more code

  • @AlirezaR5
    @AlirezaR5 2 дні тому

    looks cool. definitely be using it

  • @jonas0608
    @jonas0608 10 днів тому

    Hi, I'm running into a problem where when I Jump i go through the FALLING Parameter into my IN_AIR Animation and then with the GROUNDED Parameter into the JUMP_LAND Animation. When I'm in Idle Animation (I've got 5 idle Animations that i loop through) and press JumpButton, the JUMP_START Animation plays but I think it's affected by the Idle Animation before. I would guess it's because of Crossfade. But then again, when I'm in WALKING or RUNNING Animation this Error doesn't occur even though I have crossfade on these as well. Also the JUMP_LAND Animation does often not play when I'm not moving and it goes straight back to IDLE. If anyone seem to recognize this or may know where I made a mistake, please answer. Help is greatly appreceated! 3D Game I used another Script for my Character Controller My Code: using System.Collections; using UnityEngine; using SHG.AnimatorCoder; public class NewAnimationSystem : AnimatorCoder { public static NewAnimationSystem instance; private BasicPlayerMovement basicPlayerMovement; private Vector2 movement; private bool playIdle; private bool isCautious; [Tooltip("The time between Idle Animation switch when standing")] public float switchIdleTime = 7f; private int randomIdleAnimation = 0; private int randomCautiousIdleAnimation = 0; Animator anim; void Awake(){ instance = this; } void Start() { Initialize(); basicPlayerMovement = GetComponent<BasicPlayerMovement>(); anim = GetComponent<Animator>(); StartCoroutine(ChangeIdle()); IEnumerator ChangeIdle(){ while (true){ yield return new WaitForSeconds(switchIdleTime); randomIdleAnimation = Random.Range(0, 6); randomCautiousIdleAnimation = Random.Range(0, 2); } } } void Update() { movement.x = Input.GetAxisRaw("Horizontal"); movement.y = Input.GetAxisRaw("Vertical"); DefaultAnimation(0); StandMoveAnim(); CrouchAnim(); JumpAnim(); if(playIdle) LoopThroughIdleAnimations(); } void FixedUpdate(){ SetBool(Parameters.GROUNDED, basicPlayerMovement.grounded); SetBool(Parameters.FALLING, !GetBool(Parameters.GROUNDED) && basicPlayerMovement.rb.velocity.y < 0); SetBool(Parameters.MOVING, movement != Vector2.zero); SetBool(Parameters.WALKING, basicPlayerMovement.currentMoveSpeed <= basicPlayerMovement.sprintSpeed -1.5f && basicPlayerMovement.currentMoveSpeed >= basicPlayerMovement.crouchSpeed + 0.1f); SetBool(Parameters.SPRINTING, basicPlayerMovement.currentMoveSpeed > basicPlayerMovement.sprintSpeed - 1.5f); } void StandMoveAnim(){ if(Input.GetKey(KeyCode.LeftControl)) return; if(GetBool(Parameters.GROUNDED) && GetBool(Parameters.SPRINTING)){ PlayNormalAnimationWithCrossfade(Animations.RUNNING); } else if(GetBool(Parameters.GROUNDED) && GetBool(Parameters.WALKING)){ PlayNormalAnimationWithCrossfade(Animations.WALKING); } else if (GetBool(Parameters.FALLING)){ PlayNormalAnimationWithCrossfade(Animations.IN_AIR); } } void CrouchAnim(){ if(!GetBool(Parameters.MOVING) && Input.GetKeyDown(KeyCode.LeftControl)){ SetLocked(false, 0); Play(new(Animations.STAND_TO_CROUCH, true, null, 0.1f)); } if(Input.GetKey(KeyCode.LeftControl)){ playIdle = false; if(GetBool(Parameters.MOVING)){ PlayNormalAnimationWithCrossfade(Animations.CROUCH_WALK, 0.15f); } else{ PlayNormalAnimationWithCrossfade(Animations.CROUCH_IDLE_01, 0.135f); } } if(!GetBool(Parameters.MOVING) && Input.GetKeyUp(KeyCode.LeftControl)){ SetLocked(false, 0); Play(new(Animations.CROUCH_TO_STAND, true, new(), 0.1f)); } } void JumpAnim(){ if(GetBool(Parameters.GROUNDED) && Input.GetKeyDown(KeyCode.Space) && !basicPlayerMovement.readyToJump){ Debug.Log("Current Transition: " + anim.GetAnimatorTransitionInfo(0)); SetLocked(false, 0); Play(new(Animations.JUMP_START, true, null, 0.1f)); } } void LoopThroughIdleAnimations(){ if(!isCautious){ switch (randomIdleAnimation){ case 0: PlayNormalAnimationWithCrossfade(Animations.STANDING_IDLE_01); break; case 1: PlayNormalAnimationWithCrossfade(Animations.STANDING_IDLE_02); break; case 2: PlayNormalAnimationWithCrossfade(Animations.STANDING_IDLE_03); break; case 3: PlayNormalAnimationWithCrossfade(Animations.STANDING_IDLE_04); break; case 4: PlayNormalAnimationWithCrossfade(Animations.STANDING_IDLE_05); break; } } else{ switch (randomCautiousIdleAnimation){ case 0: PlayNormalAnimationWithCrossfade(Animations.STANDING_CAUTIOUS_IDLE_01); break; case 1: PlayNormalAnimationWithCrossfade(Animations.STANDING_CAUTIOUS_IDLE_02); break; } } } //Just to make it shorter private void PlayNormalAnimationWithCrossfade(Animations _animation, float _crossfade = 0.2f){ Play(new(_animation, false, null, _crossfade)); } public override void DefaultAnimation(int layer) { if(Input.GetKey(KeyCode.LeftControl)) return; if(!GetBool(Parameters.MOVING) && GetBool(Parameters.GROUNDED) && !GetBool(Parameters.FALLING)) playIdle = true; else playIdle = false; } } My Parameters in the Animator Editor are: On JUMP_START: Falling Parameter -> Play IN_AIR Animation On IN_AIR: Grounded Parameter -> Play JUMP_LAND Animation -> Next Play RESET On JUMP_LAND: Walking Parameter -> WALKING Animation ; Running Parameter -> RUNNING Animation ;

  • @H1D3_15
    @H1D3_15 17 днів тому

    man I cant Thank you enough😭😭

  • @t33h33studio
    @t33h33studio 20 днів тому

    I think this is great! But I take some minor architectural issues with how some of this logic was explained. Animation should be a layer on top of your game to give context as to what is happening, NOT something that manages direct control over how your game plays. More specifically that reload bit at the start, because what you said implies (A) reloading has a zero waiting period or hangover time where you aren't reloading anymore but animation lasts longer, and (B) possibly is purely aesthetic which serves no purpose than an extra button press that interrupts a game's core combat mechanic. In the first case, that means you have an issue where the animations are feeding players with misinformation on the state of what is happening in your game. In the second case, its self explanatory that its poor game design to have such a purely aesthetic feature be in the way of players utilizing your core mechanics without it being one itself. Reload times are supposed to be uninterruptible from shooting again by its game design to support more tension / periods of vulnerability, and should already be in your non-animation game logic meaning your animation shouldn't ever be in that position in the first place. Bah, I am just nitpicking your examples though. The video was great nonetheless, and tackles issues Unity's animator gets in the way of. Good work!

  • @H1D3_15
    @H1D3_15 26 днів тому

    omg I always hated to animated in the animator now I can do it through code TYSM!

  • @muskito
    @muskito 28 днів тому

    amazing! ✨

  • @jamestanubrata6782
    @jamestanubrata6782 29 днів тому

    That's so cool

  • @Clovenweb
    @Clovenweb 29 днів тому

    tbh just used first part of video🤣

  • @paradoxQ-k4n
    @paradoxQ-k4n Місяць тому

    I liked the background SFX you used.

  • @jonas0608
    @jonas0608 Місяць тому

    Hello there, I wanted to organize my Animations with state machines. Now the Animation won't switch anymore. I think it's because it's not in the "area" anymore. Does anyone know if it's possible to switch between state machines and how? Thank you for any answers! Edit: I'm able to access the AnimatorController and through that the Base Layer as an AnimatorStateMachine. How could I switch the StateMachine...?

  • @xVainear
    @xVainear Місяць тому

    Brother, I cannot believe the amount of work you just provided us. THANK YOU.

    • @xVainear
      @xVainear Місяць тому

      Liked and subscribed, is there anything you need?

  • @jcashbeatzrh
    @jcashbeatzrh Місяць тому

    Amazing video! Much appreciated works great.💯

  • @servhasvids
    @servhasvids Місяць тому

    These are so bad; post processing isn't as simple as "throwing some filters" onto things. Cheap lazy devs do this all the time and it makes me pull my hair out every time I see an overblown bloom and unnecessary chromatic aberration that destroys the entire clarity. Thankfully people who do these are incompetent, so they aren't making games worthy of playing.

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      I understand where you’re coming from. It can be frustrating when it seems most devs use a generalised/one size fits all approach to graphics. But that is not what I’m here to do. I strive to spark inspiration and deliver niche concepts surrounding the game dev tutorial scene. These ideas should be treated as a starting point, rather than a complete solution. For example, I pulled Chromatic Dizziness from SOMA as an inspiration and in the video I show how to approach making this similar effect in your own projects. All I’m here to do is spark inspiration, I love seeing what my viewers can create with these concepts.

  • @THE_REDGRAVES
    @THE_REDGRAVES Місяць тому

    Pretty cool and handy tool Professor SHG. Ever considered working on distance based scene /room/Area/Zone Loading . I've tried making this system multiple times but it either crashes or assets don't properly load in and out.

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      Ho ho thank you! So it sounds like the tool you’re going for is some type of distance-based occlusion culler. I did make something similar when I made the Mutantity demo. For it I made a mountain range and caves for the player to explore. But I did cheat a little bit with loading objects in (shh don’t tell anyone 🤫). I made colliders around the map so when the player walks on them, it would disable all game objects the isn’t tied to the particular section of the map. Such as I had Outside, Cave 1, Cave 2, Water Cave, and Mines. The children of those gameobjects were the meshes related to those sections, and only one was active at a time (unless it was transitioning between sections). Not sure if that helps, I just went for the easy, cheeky approach.

    • @THE_REDGRAVES
      @THE_REDGRAVES Місяць тому

      @@SmallHedgeHQ oh , that does sound like it could work thanks ill try that approach. keep up the good work professor your content is a blessing

  • @ReasonMakes
    @ReasonMakes Місяць тому

    I'm probably gonna sound like a jerk here but I'd want to know this if I was the content creator so... I saw your thumbnail in my feed and was about to click on it and watch it, until I saw it was for Unity. After they pulled the whole *'you retroactively owe us tons of money because we can'* stunt no one is using Unity anymore. You should try switching to Godot. It supports C# too. Open source and free is the way of the future 👍

    • @Owenmon36
      @Owenmon36 Місяць тому

      While godot has gotten much popular it is still far inferior to unity in both functionality and popularity

  • @kpm25
    @kpm25 Місяць тому

    Thanks!, New Zealand??

  • @Robin-xk1pp
    @Robin-xk1pp Місяць тому

    Thanks dude you saved me from hell!

  • @usercontent2112
    @usercontent2112 Місяць тому

    Awesome tut!

  • @Stotle003
    @Stotle003 Місяць тому

    How do you make a moving ball in 2d make a noise when it colides with another object that is rigid. I cant find it, everyone does 3d

  • @Jubez81
    @Jubez81 Місяць тому

    Could not get this working hit up hedge no reply :( Stripped my game of it.

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      Sucks to hear. If you have a specific question, I can help you out with it :)

  • @MrBOI-1
    @MrBOI-1 Місяць тому

    Hey, i am getting errors when i use (On Parameter), the error is : NullReferenceException: Object reference not set to an instance of an object. its saying at line 23 in OnParameter.cs. Thanks

  • @travis391
    @travis391 Місяць тому

    Does this support skinned meshes??

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      Not at the moment, but there will be an update in 2-3 weeks including that feature.

    • @SmallHedgeHQ
      @SmallHedgeHQ 29 днів тому

      The latest update of Mesh Wrapper now supports skinned meshes. ua-cam.com/video/DSptzgj8uu0/v-deo.html

    • @travis391
      @travis391 29 днів тому

      @@SmallHedgeHQ Awesome! Thanks for the update. :)

  • @pablovillegas2898
    @pablovillegas2898 Місяць тому

    Nice video but i have a problem, How can I lower the volume of the walking sound independently?, my walking sound is very loud and I would like to decrease it without altering the others

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      I actually found this exact issue! On the GitHub link, you can now change each sound volume in the Unity inspector, as well as its audio mixer. So the sound manager shown in the video is a little bit outdated.

    • @pablovillegas2898
      @pablovillegas2898 Місяць тому

      @@SmallHedgeHQ Oh, ok i'll try it

  • @justinrush7463
    @justinrush7463 Місяць тому

    Hello, I'm aiming to be a new user of this system, but I have one worry. See, when making the system on your own like in the last video, I can use inheritance to give every entity in my game access to their own brain, as I can just make a new class that contains functionally the same things but with the proper data for the entity it will be used with. How do you handle separate brains with this plugin version of it? Because if I'm reading this right, there's only one AnimatorValues script, and all implementation of this plugin will call back to that script, with no way to tell it what values it should be using.

    • @SmallHedgeHQ
      @SmallHedgeHQ Місяць тому

      I suppose this is where there is a balance for convenience and optimisation. This method prioritised convenience (having one global AnimatorValues) and ease of use rather than each animator having their own set of values. A design decision that I thought was a good trade off.

  • @Tiff_Dragoon
    @Tiff_Dragoon 2 місяці тому

    THANK YOU SO MUCH THIS IS TRULY AMAZING, Like back then I have to find freaking multiple animations online just for it to be slightly different, now this is so much better on so many levels!

  • @Equisdeification
    @Equisdeification 2 місяці тому

    Nice video! A simple dictionary of <SoundType, AudioClip> that you create at runtime feels much easier to read. Also be careful with having all your sounds in a single script, specially on mobile, because if the game grows, this means having all the game audio loaded into memory from the start, even sounds that you don't even need in the current scene

  • @alekjatuszyk4976
    @alekjatuszyk4976 2 місяці тому

    i actually used a system similar to this in my AI framework asset, and it is waaaaay easier and nicer than the transitions (asset name: Alek AI Framwork). nice work!

  • @daxmiller2670
    @daxmiller2670 2 місяці тому

    does this method only works for 3d ?

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      For 2d and 3d! I actually showcase how to use these techniques in 2d in the next video of the series 😁ua-cam.com/video/9tvDtS1vYuM/v-deo.html

  • @OrbitZeroStudios
    @OrbitZeroStudios 2 місяці тому

    So I tried this plugin, and it was a straightforward approach for my project but when dealing with multiple Animation layers, the reset almost always does not work. I found the issue, it was happening because there was only one currentCoroutine for various layers. To fix this issue: public abstract void DefaultAnimation(int layer); public Animator animator; private Animations[] currentAnimation; private bool[] layerLocked; private ParameterDisplay[] parameters; private Coroutine[] currentCoroutine = null; /// <summary> Sets up the Animator Brain </summary> public void Initialize() { AnimatorValues.Initialize(); Animator animator = GetComponent<Animator>(); layerLocked = new bool[animator.layerCount]; currentAnimation = new Animations[animator.layerCount]; currentCoroutine = new Coroutine[animator.layerCount]; <----------------------------------------- //rest of the initialize } Later In the play stop and start the coroutine according to the respective layer if (currentCoroutine != null) { StopCoroutine(currentCoroutine[layer]);} if (data.nextAnimation != null) { currentCoroutine[layer] = StartCoroutine(Wait()); IEnumerator Wait() { animator.Update(0); float delay = animator.GetNextAnimatorStateInfo(layer).length; if (data.crossfade == 0) delay = animator.GetCurrentAnimatorStateInfo(layer).length; yield return new WaitForSeconds(delay - data.nextAnimation.crossfade); SetLocked(false, layer); Play(data.nextAnimation, layer); } } Hope this helps

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      Duude, you are a genius for finding that bug. I really couldn't have made this plugin without this community. Most of the ideas for this plugin came from you all. Really appreciate all the feedback and suggestions. I have committed a new version with these changes on the github page.

    • @OrbitZeroStudios
      @OrbitZeroStudios 2 місяці тому

      @@SmallHedgeHQ[Edit] The above methods works fine there was a mistake in myside of the code that was causing it to through an error. Hello there this is very important, Please replace the array of the coroutines with a list, otherwise the plugin will give not work but remain stuck on the default animation. private List<Coroutine> currentCoroutine = new List<Coroutine>(); /// <summary> Sets up the Animator Brain </summary> public void Initialize() { AnimatorValues.Initialize(); //Animator animator = GetComponent<Animator>(); layerLocked = new bool[animator.layerCount]; currentAnimation = new Animations[animator.layerCount]; // Coroutine[] currentCoroutine = new Coroutine[animator.layerCount]; currentCoroutine = new List<Coroutine>(animator.layerCount); // this.animator = animator; for (int i = 0; i < animator.layerCount; ++i) { layerLocked[i] = false; currentCoroutine.Add(null); int hash = animator.GetCurrentAnimatorStateInfo(i).shortNameHash; for (int k = 0; k < AnimatorValues.Animations.Length; ++k) { if (hash == AnimatorValues.Animations[k]) { currentAnimation[i] = (Animations)Enum.GetValues(typeof(Animations)).GetValue(k); k = AnimatorValues.Animations.Length; } } } //rest of initialize} And later in the Play function if (layerLocked[layer] || currentAnimation[layer] == data.animation) return false; if (currentCoroutine[layer] != null) { StopCoroutine(currentCoroutine[layer]);} layerLocked[layer] = data.lockLayer; currentAnimation[layer] = data.animation; animator.CrossFade(AnimatorValues.GetHash(currentAnimation[layer]), data.crossfade, layer); if (data.nextAnimation != null) { currentCoroutine.Insert(layer, StartCoroutine(Wait())); IEnumerator Wait() { animator.Update(0); float delay = animator.GetNextAnimatorStateInfo(layer).length; if (data.crossfade == 0) delay = animator.GetCurrentAnimatorStateInfo(layer).length; yield return new WaitForSeconds(delay - data.nextAnimation.crossfade); SetLocked(false, layer); Play(data.nextAnimation, layer); } } I hope you will see this comment and change the Repository again. There is some problem with using an array. Using array only works when there is no next animation for some reason.

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      @@OrbitZeroStudios hmm that is really bizarre. I’ll look into it tomorrow. Thanks for letting me know

    • @OrbitZeroStudios
      @OrbitZeroStudios 2 місяці тому

      @@SmallHedgeHQ I am such an idiot. It was working fine I had a typo there in the initialize Please remember the following text: "Coroutine[]"was added by mistake currentCoroutine = new Coroutine[animator.layerCount];

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      @@OrbitZeroStudios aha that would make sense!

  • @mohamedhamed3572
    @mohamedhamed3572 2 місяці тому

    Amazing!

  • @muskito
    @muskito 2 місяці тому

    thats amazing

  • @jamestanubrata6782
    @jamestanubrata6782 2 місяці тому

    Wow that is useful to make ps1 style game it's so awesome

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      Appreciate it! It really helps streamline the process for those types of games.

  • @lekretka
    @lekretka 2 місяці тому

    Good and simple tool. I even checked the code. Some advices: 1. AnimationData can be a struct, this will remove unnecessary pressure on GC. Sure you can cache class in static field, but simply making it struct would be preferable imo. There's no struct recursion, but I used Spine 2D plugin in one project, spine has SetAnimation and AddAnimation for queueing animations. And if AnimationData is a struct without recursion, then you can actually expose and configure it from the inspector which is nice too. 2. It's may not be that easy, but I would try generics and made something like AnimatorCoder<TAnimationId, TParameterId> and OnParameter<TParameterId>, so you could make your own ids and parameters, enums or structs, or even scriptableObjects, without actually modifying plugin code.

  • @jamestanubrata6782
    @jamestanubrata6782 2 місяці тому

    Wow thats so cool, do you have 3d tutorial for cinemachine

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      Thanks! Cinemachine has a lot of features so that video would be huge xD

    • @jamestanubrata6782
      @jamestanubrata6782 2 місяці тому

      @@SmallHedgeHQ you should also try making how to switch between multiple cinemachine like if there is 4 or 5 of them

  • @jamestanubrata6782
    @jamestanubrata6782 2 місяці тому

    Do you have anything that creates fake shadows in realtime

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      I’ll look into it! Fake shadows would be super useful.

    • @SmallHedgeHQ
      @SmallHedgeHQ 29 днів тому

      Thought I'd let you know that Mesh Wrapper can now create fake shadows at runtime. ua-cam.com/video/DSptzgj8uu0/v-deo.html

  • @muskito
    @muskito 2 місяці тому

    can i use this to make a fake shadow spot for my character? i mean, use in realtime?

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      That is a great idea. Have a mesh drag behind a player that sends raycasts X times per second to wrap onto the ground beneath it. Currently this is a Unity Editor tool, but I will consider updating this to be optimised at runtime. That kind of feature would be epic, I will let you know if it happens.

    • @muskito
      @muskito 2 місяці тому

      @@SmallHedgeHQ nice!

    • @SmallHedgeHQ
      @SmallHedgeHQ 29 днів тому

      ​@@muskito Hey Muskito. Thought I'd let you know that Mesh Wrapper now supports fake shadows at runtime. Thanks for the suggestion! ua-cam.com/video/DSptzgj8uu0/v-deo.html

  • @muskito
    @muskito 2 місяці тому

    amazing!

  • @ocks_dev_vlogs
    @ocks_dev_vlogs 2 місяці тому

    This honestly seems really useful

  • @oliviabigley3378
    @oliviabigley3378 3 місяці тому

    Gosh it's so exciting to see the game finished!

  • @mitchyoungs212
    @mitchyoungs212 3 місяці тому

    This is awesome

  • @-sistudio4347
    @-sistudio4347 3 місяці тому

    лучший, бро 💞💞💞💞💞💞

  • @Titanblade17
    @Titanblade17 3 місяці тому

    I keep getting the error “Animator.GotoState: State could not be found UnityEngine.Animator:CrossFade (int,single,int)” And it sends me to line 138 of the AnimatorCoder script. animator.CrossFade(AnimatorValues.GetHash(currentAnimation[layer]), data.crossfade, layer); Any idea what’s happening? I’ve been searching for hours and can’t figure it out.

    • @SmallHedgeHQ
      @SmallHedgeHQ 3 місяці тому

      The most likely explanation is the enum value passed in Play() does not exist as a state in the animator. For example, if your animations enum looks like Enum Animations { RUN, WALK, IDLE } Then there must be a state that is named RUN, IDLE, or WALK

    • @Titanblade17
      @Titanblade17 3 місяці тому

      @@SmallHedgeHQ Ok, I'll try looking at that again! Thanks!

  • @michieldeekens9218
    @michieldeekens9218 3 місяці тому

    Hey man! I am using this instead of the animator now, and I am loving this! But I have a small question regarding blend-trees. If I want to use a Strafe left/right on top of walking/running, how can I achieve this using your code?

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      Sorry for late reply! Took time off and slowly getting through comments. I got asked a lot about blend trees. Unfortunately this is set up to optimise single state transitions, not blending multiple animations together. Best bet is to add more crossfade (transition time) to have walk left, right, forward, back animations and transition between them.

  • @user-uf8sk6nf6z
    @user-uf8sk6nf6z 3 місяці тому

    You are the best 😍😍😍😍 Thanks!!

  • @Jay-if9uf
    @Jay-if9uf 3 місяці тому

    Bruh, I dont see anything moving.

  • @junyuhan-to6kw
    @junyuhan-to6kw 3 місяці тому

    What if I want to randomly play multiple animations of each type with this plugin

    • @SmallHedgeHQ
      @SmallHedgeHQ 2 місяці тому

      Each layer holds one singular current animation at a time and is tracked through an enum. So to pick a random animation, you could do Animations[Random.Range(0, Enum.GetNames(TypeOf(Animations)).length] to get a random animation. Or make a list of Enum values to randomly choose from. Each Enum value is given an integer, which allows you to look up them through an array.

  • @IRIS6706
    @IRIS6706 3 місяці тому

    well...unity animator is terrible, but controlling all of your animations with code is even worse.

  • @billylin6089
    @billylin6089 3 місяці тому

    This video has helped me so much on my game

  • @TheAtticus82
    @TheAtticus82 3 місяці тому

    Great stuff, man! Just earned a new sub.