Answer by Arshia001
I also found another way to do it. Just add a new style to your GUI skin, such as "full health" and set the normal state's texture to the full health texture. do the same with the empty texture and...
View ArticleAnswer by Arshia001
there is no such thing as "water" in 3D graphics, you'll have to play around with transparent shaders and see which one fits the look you're trying to get best. My first guess would be to use a...
View ArticleAnswer by Arshia001
I'm guessing (as this has happened to me once, too) that you copied only the assets folder over, and not the library folder. If so, try copying the entire folder of your project.
View ArticleAnswer by Arshia001
There's Input.acceleration which you can use to read the device's accelerometer data (I'm not exactly sure whether orientation and gravity count as accelertion or not), and you can use it in the OnGUI...
View ArticleAnswer by Arshia001
You should store a reference to the other bike's spawned (cloned) prefab, and do something like this: other_bike.FindChild ("Name of the child gameobject for which you want to change the texture")...
View ArticleAnswer by Arshia001
There's an initial velocity property in the particle emitter. Set it to point towards the mouse cursor's position in your script.
View ArticleAnswer by Arshia001
Yours is not the best way to do it, although it's theoretically possible. The proper way would be to set the light to be a child of the camera (which should in turn be a child of the whole fps...
View ArticleAnswer by Arshia001
You'll need to find the points between the brush's previous location and the current one, and set them all as well. Basically, if you were using a single dot as brush, you'd just draw a line between...
View ArticleAnswer by Arshia001
GetComponentsInChildren retrieves the COMPONENTS, not the gameobjects. Does your child gameobject have a component attached? To answer your second question, use the code sample button above the text...
View ArticleAnswer by Arshia001
I don't know why you'd wanna move a GUI element around like that, but still...When you load a scene, all the objects in it are loaded, including those which were not destroyed during a new level load....
View ArticleAnswer by Arshia001
I think the problem is that scrollVec (which is the vector that's supposed to store the scroll bar's position between frames) is being initialized every frame. Try moving its declaration outside your...
View ArticleAnswer by Arshia001
Use the animation states. You can access your animation with: AnimationState anim = myGameObject.animation["MyAnimationName"]; then you can modify the animation's properties, including play speed and...
View ArticleAnswer by Arshia001
How are you moving the ship? If you're using your own scripts to MOVE it, collisions won't stop it. It'd help if you could share your code.
View ArticleAnswer by Arshia001
Judging from your code, it's placed on the clones, right? If that is the case, every one of the clones is checking the mouse button and destroying itself. It is VERY VERY bad practice to write Input...
View ArticleAnswer by Arshia001
foreach (AudioSource s in (AudioSource[])findSceneObjectsOfType(typeof(AudioSource))) if (!ReferenceEquals(s, theOneYouDontWantToDull)) s.volume = 0.1f; //or whatever you want to set it to
View ArticleAnswer by Arshia001
try adding this after _lookRotation = ... Vector3 v = _lookRotation.eulerAngles; v.x = 0; _lookRotation.eulerAngles = v; this code sets the X rotation of the euler angles to zero, which means you'll...
View Article
More Pages to Explore .....