Copy Animation State in Unity Tutorial

  Рет қаралды 5,835

PabloMakes

PabloMakes

Күн бұрын

Пікірлер: 25
@Claudiopo_1
@Claudiopo_1 6 ай бұрын
I used your tutorial for something else (changing my character's skins), I seriously spent months looking for how I could implement it and your code helped me a lot.
@IljaDidDevs2
@IljaDidDevs2 3 жыл бұрын
Awesome content! Definitely interested to see how you achieved that shader effect as well :)
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks! I’ll try and make one about the shader, maybe show a few variations like for crystals and such
@IljaDidDevs2
@IljaDidDevs2 3 жыл бұрын
@@PabloMakes Nice, sounds interesting!
@vaschen3243
@vaschen3243 2 жыл бұрын
Great tutorial with simple explanation. Best part of the video is that instead of just showing how to do it, you introduced pooling (which is important if not using ECS) for performance sake. The trick on Dahlia looks similar to TeriTeri evade from Honkai 3rd. BTW, Karina and all the fluffy grumpy cats are so cute!! Personally I would choose to use custom toon shader for anime style characters, but you tune the lighting to make them look nice also. Thanks for sharing! Hope you keep on making videos! Muchas Gracias!
@frostymug3123
@frostymug3123 3 жыл бұрын
Outstanding! Struggling getting the 2nd script "GhostController" to work as the camera never shows the top portion of the script. Any chance you could provide a copy?
@PabloMakes
@PabloMakes 3 жыл бұрын
I show the top part at 9:12 I think you can see everything there except for the using statements, which im sure are pretty straight forward, but if you are still stuck, let me know the error you are getting and I'll try to help
@frostymug3123
@frostymug3123 3 жыл бұрын
​@@PabloMakes thank you for the reply. I was getting errors on pretty much every other word. I'll check again at 9:12 and see what I can figure out.
@frostymug3123
@frostymug3123 3 жыл бұрын
@@PabloMakes I've still got errors throughout the code (no errors in the CopyDemBones script) There are a few sections I still can't see on the video. The first error is with: List Ghosts; - (unknown symbol error) .. and then pretty much everything after GenerateGhost(); in the update method is red. I'd really appreciate a copy of the script. See below for what I've got so far I've also noted the 2 places I still can't see from the video (Start and the code above private void GenerateGhost() ) using System.Collections; using System.Collections.Generic; using UnityEngine; public class GhostController : MonoBehaviour { public GameObject SourceBoneRoot; public CopyDemBones GhostPrefab; public float GhostDistance = 10; public float GhostLife = 10; public float GhostFadeInTime = 1; public float GhostFadeOutTime = 1; public float GhostDistortion = 1f; public float GhostDistortionOutTime = 1; public float GhostScaleOut = .25f; bool Generate = true; Vector3 LastPosition; float DistanceTraveled = 0; List Ghosts; Vector3 InitialScale; Queue GhostPool; public bool GetGenerate() { return Generate; } public void SetGenerate(bool value) { Generate = value; } void Start() { //CAN'T SEE CODE } // Update is called once per frame void Update() { DistanceTraveled += Vector3.Distance(transform.position, LastPosition); LastPosition = transform.position; if(Generate && DistanceTraveled >= GhostDistance) { DistanceTraveled = 0; GenerateGhost(); } } List removeGhosts = new List(); foreach(GhostContainer ghost in Ghosts) { ghost.Life -= Time.deltaTime; if(ghost.Life 0) { ghost = GhostPool.Dequeue(); SetGhostMaterialVar("vertexDistortionStrengh", ghost, 0); ghost.transform.localscale = InitialScale; ghost.gameObject.SetActive(true);0 } else { ghost = Instantiate(GhostPrefab, transform.parent); } Ghosts.Add(new GhostContainer(ghost, GhostLife)); ghost.transform.localPosition = transform.localPosition; ghost.transform.localRotation = transform.localRotation; ghost.Source = SourceBoneRoot; ghost.Initialize(); ghost.CopyBones(); } }
@PabloMakes
@PabloMakes 3 жыл бұрын
In start you probably need to initialize the ghost queue. It’s hard to read with this formatting but it looks like you closed update and then wrote code outside of a function? Might just be the formatting tricking me
@Lynx4112
@Lynx4112 Жыл бұрын
Hi Frosty did you ever get your copy animation to work?
@nancyliu2328
@nancyliu2328 3 жыл бұрын
Great video! It would be really cool if you could make a video about the shader of distort appearance.
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you enjoyed it. I’ll plan a video for that, lots of cool stuff can be done with that
@clearsky4049
@clearsky4049 3 жыл бұрын
Great tutorial Pablo, thanks for sharing the wisdom! Although I'm wondering how much of a performance hit enabling/disabling objects in the hierarchy is, maybe in certain cases pooling isn't worth the performance gain. I'm also curious whether the pooling approach is too taxing on the memory or not. For example do inactive objects in the hierarchy take up as much memory as the active objects?
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you enjoyed it! Memory wise they totally take as much memory but in practice the big memory consumption comes from assets, you are not likely to go OOM from game objects so I would not worry too much there. I think a circumstance where a pool is questionable is when the number of objects being used varies wildly, like let’s say you have mini map markers, and when you go into a town there’s 30 different markers for vendors but when you go out into the world you only have 1 marker for your objective. Using a pool there you would have 29 markers allocated that essentially do nothing.
@clearsky4049
@clearsky4049 3 жыл бұрын
@@PabloMakes Thanks for the insight! That cleared up a lot of the questions in my head regarding the topic.
@bluzenkk
@bluzenkk 2 жыл бұрын
awwww , from the title, i thought you were going to make this via shader graph... lol but i like it anyway~~ cheers~
@afk1466
@afk1466 3 жыл бұрын
great tutorial 👍.
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you enjoyed it!
@Rafaelcraftero
@Rafaelcraftero 3 жыл бұрын
nice video ty
@G3oX_ESP
@G3oX_ESP 3 жыл бұрын
Nice video! Well explained and I love this tips of old school developer ;) I like this shader. If you can make this tutorial I will apprecite it, sure i lean lot of things ;)
@PabloMakes
@PabloMakes 3 жыл бұрын
Looks like a few people are interested so I’ll make it happen!
@richardgonzalez3474
@richardgonzalez3474 3 жыл бұрын
Hello, I love your videos and the connection you have with your cat. ¿Can you make how use animation blend?, Regards from Panamá
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you enjoyed them! I do go over some animation blends in this tutorial in the animation section kzbin.info/www/bejne/qIqaYohno62leMU is there a particular thing you would like to see with blends?
Using IK to Improve Animations in Unity
12:05
Game Dev Guide
Рет қаралды 68 М.
Refraction ShaderGraph tutorial for Unity
16:46
PabloMakes
Рет қаралды 12 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Twitch integration with Unity Tutorial
10:48
PabloMakes
Рет қаралды 15 М.
How to Program in Unity: State Machines Explained
18:56
iHeartGameDev
Рет қаралды 234 М.
The Best Unity Assets (according to this one guy)
6:39
PabloMakes
Рет қаралды 6 М.
How to make AWESOME Scene Transitions in Unity!
19:45
Brackeys
Рет қаралды 966 М.
CHARACTER TRAIL TUTORIAL in Unity
15:11
Gabriel Aguiar Prod.
Рет қаралды 44 М.
Exploring Abandoned Games From Your Childhood
20:00
globert
Рет қаралды 15 М.
Creating procedural walk movement | Prototype Series
5:50
Radial Menu Tutorial for Unity
18:37
PabloMakes
Рет қаралды 13 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.