Answer by M-G-Production
Hi Budd! I had the same problem. Be sure to gameObject.SetActive(true) your Tank Game Object before trying to start a coroutine located in a script attached to it!
View ArticleAnswer by M-G-Production
First you should consider storing that 'wall' into a local variable to increase performance. Then you should use position instead of localPosition (position is the real world position, localPosition is...
View ArticleAnswer by M-G-Production
Hi! Do you have a Physic Material on your Rigidbody 2D? I'm actually using lots of Edge Colliders in my project and never had this issue!... Exept while using one of my created Rigidbody Material.
View ArticleAnswer by M-G-Production
The problem is... When you destroy your gameObject, the script can no longer be executed... Here: IEnumerator Poof() { yield return new WaitForSeconds(Seconds); Destroy(gameObject); //THIS LINE!! }...
View ArticleAnswer by M-G-Production
ParticleSystem.MainModule main = GetComponent().main; main.loop = true; This way, you store the main module in a variable. EDIT: In your case: ParticleSystem.MainModule = thrustsParticles [i].main;...
View ArticleAnswer by M-G-Production
It looks like minEmission is now deprecated... Perhaps this could help? [ParticleSystem.emission][1] [1]: https://docs.unity3d.com/ScriptReference/ParticleSystem-emission.html
View ArticleAnswer by M-G-Production
Hey Bud! The problem is that your **rigTransform remains null**... It tries to access it's parent and it looks like it doesn't have one! So Unity throws an error... I think you wan't your Camera to...
View ArticleAnswer by M-G-Production
**Of course it's possible!** So I guess that your goal is: When the player enters a trigger, a certain object would teleport itself to another location? There are tons of ways to do this! first you'll...
View ArticleAnswer by M-G-Production
**Wow... You gave me a hard time with this!** I managed to find a way of doing this, but you will need to use List instead of Array. *(Don't worry, Lists are better!! )* Let me explain you the thing a...
View ArticleAnswer by M-G-Production
There are no needs of doing that in loops my friend! And think about it, you have a foreach loop in a do loop! Really bad idea! There are tons of ways to have the same result without loops :) Show me...
View ArticleAnswer by M-G-Production
Hey Bud! First you need to know that Transform.Position is not the same as your camera bounds! So you simply need to convert your sprite world position to a screen position. I did it for you! If it...
View ArticleAnswer by M-G-Production
First: Your player GameObject and your health sprite GameObject must both have a collider 2D. The Health Collider2D must be set as Trigger. Then in your health object, Add a script with these lines of...
View ArticleAnswer by M-G-Production
I suppose you simply flip the SpriteRenderer and you work with gravityScale (from Rigidbody2D)? If so, let's make it super simple then. public SpriteRenderer mySprite; public Rigidbody2D myR; public...
View ArticleAnswer by M-G-Production
I would probably look like that: y = Mathf.Sqrt(Mathf.Pow(a, 3)/u) * (x - n * Mathf.Sin(x))
View ArticleAnswer by M-G-Production
There are lots of ways to do it! If you want to do it like Button component, Look for **UnityEvents**. Example: using System.Collections; using System.Collections.Generic; using UnityEngine; using...
View ArticleAnswer by M-G-Production
This would be the most simple way to do it Create a C# script, name it '**FadeOut**' and then drag it on your logo gameObject. Then copy/paste the code and tweak it. using System.Collections; using...
View ArticleAnswer by M-G-Production
**Salut Isador34!** Je suis passé par le même problème... So to display an EnumPopup on your custom inspector, put this line of code in your OnInspectorGUI() function: //Look for the Enum...
View ArticleAnswer by M-G-Production
## Hi soulburner ## ---------- Personal Indie tips! ---------- **First**, look for tutorials about simple animations on Unity3D. It will help you! **1 - If you need some complex cut scenes wich...
View ArticleAnswer by M-G-Production
So here it is vultt3rim! There is plenty of way to do it, but now I'll show you mine! I made it simple with bunch of comments to see what's actually going on! So this C# system will instantly work and...
View ArticleAnswer by M-G-Production
**I formatted your code, and there is nothing here about Jumping :S** var walkSpeed: float = 7; // regular speed var crchSpeed: float = 3; // crouching speed var runSpeed: float = 20; // run speed...
View Article