Loop animation
My animation will not loop, even though i checked the box loop and the one right under it (also tried with only loop checked)![alt text][1] [1]: /storage/temp/152664-screenshot-5.png
View Articlehow to slow whlie down in c# code?
while loop gives me float "mana" at the speed of light do you know how to slow it down? simplified code public static float mana = 1; void Update() { while (mana < 100) { mana++; } }
View ArticleMy loop isn't working and I don't know why.,My loops arent working.
two errors in my short collection of practice loops (23,25): error CS0029: Cannot implicitly convert type 'int' to 'bool' (23,31): error CS0201: Only assignment, call, increment, decrement, await, and...
View ArticleWhat is the difference between storing value of loop counter and then using...
Hi, I was trying to create a script to generate buttons dynamically. I sucessfully managed to do that by following the answers to this question:...
View Articletrying to instantiate an object a random number of times ,how do i spawn...
trying to instantiate an object set random number of times but it just loops infinitely using System.Collections; using System.Collections.Generic; using System.Data; using System.Globalization; using...
View ArticleCheck bool state for each Gameobject in a list
Scenario: I have a door that is triggered open by a pressure plate. In some cases I want the door to trigger open only by multiple pressure plates at the same time. What I want is to check the list of...
View ArticleMy Unity Editor crashes when i try to enter playmode
when i press play it says application.playmode in a pop up window and then it continues forever until i end the task entirely. i think it is an infinite loop problem with this script my script is meant...
View ArticleHow do you make a time bomb beeper
## Help Me I'm Dying ## So I'm working on a game where there is a time bomb, the bomb is set to go off after one minute. I want to add a feature where the bomb beeps and it gets faster and faster...
View ArticleForeach loop not going through all the children
Im trying to loop through an array of Trail Renders (length: 2), but it does not loop and only runs once, so only 1 trail render gets enabled... In c#, unity 3D Code: ''' TrailRenderer[] AllTrails;...
View ArticleWhere do I place the while(true) in the following script without causing...
Hello @Hellium! I wanted to thank you for helping me with this project. I appreciate your feedback and have learned a lot about how to use different approaches in using code. I received your message on...
View ArticleLoops without coroutine [SOLVED]
Hii, i need to create a simple loop but without using coroutine we can easily do that outside of unity but as far as i know in unity you must use IEnumerator to do this but that means i need an...
View Articleafter foreach . my Update() doesn't continue
I have foreach in Update() and after the foreach loop it moves to run other scripts updates and when it comes back it starts the update again. top of my Update(): void Update() { GameObject[] nearby =...
View Articlehow can i repeat an if statment for x sec?
Hi! I trying to make the Player jump if it is grounded and if the player isn't grounded check if the Player will be grounded in the next x sec. So if the Player become grounded i the x sec it will...
View ArticleNested For loop Grouping
Hi Everyone, I'm making a procedural City generator using nested for loops; public Regions[] regions; for (int x = 0; x < gridX; x++) { for (int z = 0; z < gridZ; z++) { if (x < gridX/region...
View ArticleNested For Loop Question
Hi All, I'm building a City Generator currently using nested for loops to create a Grid. for (int x = 0; x < gridX; x++) { for (int z = 0; z < gridZ; z++) { Build City } } I would like to group...
View ArticleWhile loop variable assignment not workin
Hi All, I'm a bit confused. Variable assignment within a while loop isn't working and I cant figure out as to why. [This is being called in the Awake() Function] _currentTile = startingTile; int...
View ArticleHow to add delay/wait in between tween loops in dotween?
I tried to put Onstepcomplete() with IEnumorator yeild return, but that doesn't work.
View ArticleHow to change (grand)children tag?
In this (part of) script I "eject" the "selected" gameobject (called "Int_Molecule") from the player object. void Eject() { if (Player.objectGrabed.Count >= 1 &&...
View ArticlePhysics.OverlapSphere weirdness, not working...Sorta.
I have this Physics.OverlapSphere running in a loop and there are a few results I get depending on various circumstances, none of which seem to do what I am actually expecting it to do. In the event I...
View ArticleHow to get all the tree loop levels when recursive ? ?
using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEditorInternal; using UnityEngine; public class GetChildsEditorWindow : EditorWindow { public Transform...
View Article