Quantcast
Channel: Latest Questions on Unity Answers
Browsing all 171066 articles
Browse latest View live
↧

Toggle Textures on and off

Hi there, In my game I would like to be able to toggle Textures on and off. Does anyone have experience doing this? or can offer some ideas how to do this? I'm also doing this on the android platform....

View Article


Distant terrain level of detail question.

Do I just make a terrain neighbour and then set the camera clipping view really far? Will the terrain neighbouring thing handle the detail LOD, or do I have to make the extra LOD models for the...

View Article


RemoveAt() dosn't work

hi guys av got a problem that's been rocking me for weeks, in my game i am instantiating stuff from an array and use the RemoveAt() to removing stuff so that it don't get instantiated again but somehow...

View Article

Include .txt files in build

Hi guys, I'm making a game where maps are saved in specific folders with .txt files. I want the files to be included in the build ( the game is for android ) so that when the user install my app, the...

View Article

Change speed of a running iTween

I have a running iTween and I want to change the duration on the fly (i.e. without restarting the Tween). Getting the iTweenComponent and reducing the time value produces very strange results and seems...

View Article


Kinematic rigidbody only triggering once

I have an object with a bunch of rigidbodies and colliders as its children. I have a static trigger in my scene, this gets triggered by the rigidbodies. But at some point I turn all the rigidbodies to...

View Article

RemoveAt() doesn't remove instantiated objects. Here's the code

var cube1:GameObject; var cube2:GameObject; var clone:GameObject; var obj:GameObject[]; var spawnPoints:GameObject[]; function Start () { spawnPoints=GameObject.FindGameObjectsWithTag("spawn"); yield...

View Article

Getting Android ID in Unity

Hi everyone! I tried looking for a similar question/answer, but I cannot seem to find anything concrete. Is it possible to get the Android device ID in Unity without using a .jar plugin? Do you need a...

View Article


When saving the scene the editor still says there are changes left

Hello, in my current Project when I hit the save button Unity still displays a * in the Title Bar (like this "Unity - Scene.unity - MyProject - PC, Mac & Linux Standalone*) indicating that there...

View Article


How to access variable from other script in runtime?

Hi lads, I'm new to Unity. Now I have a prefab of enemy and my gun is using ray-cast to detect if hits the enemy. I have two js files. One is fireBullet.js which detects ray-cast and other one is...

View Article

Colliders no longer working and overlapping objects

First of all, my colliders in the editor are no longer working. They did last week, but I had my script and scene open when my computer died. I have no idea what was lost, if anything. The colliders...

View Article

How to Make a Ship and it's Projectiles Orbit a Planet? (Like in Super Stardust)

Hi, I am looking to make a game similar to that of super stardust. It is basically a game where the player, camera, enemies/asteroids and projectiles are orbiting a planet around a certain radius from...

View Article

My level load code isnt working

I'm very new to unity so it's probably my error but this script isn't working and I can't see why it isn't working. I don't get an error just when I go in game and click the object nothing happens....

View Article


Background music and button sound at the same time PROBLEM

Hello i have a intro with background music at the start of my game and when they come to the menu the background music still plays but i also have button sound on my menu so if someone clicks a button...

View Article

unity interactive cloth but keep the original scale of the object

when i use interactive cloth , my object changes scale and i want ( if it's possible) that the scale remains equal as at the start (sorry for the language , im not english) here you are two images (...

View Article


How To Add Objectives In Game?

I want to make like this Objectives ***I want to make GUI text appear about 5 seconds before do the objectives and then dissapear*** 1. Find a machine, pull lever/push button 2. Find way out/Escape Do...

View Article

How to subtract one time from another?

Hello. What i want is when user press "Enter" button, we wright current time to variable "firstTime" and when we again press "Enter" we wright current time to variable "secondTime" and then subtract...

View Article


Rotation and moving object simultaneously problem?

Hello Everyone, I am new on UNITY and i am making a one game in which simple swipe ball will swipe in X and Y Direction..But the problem is when i am trying to swipe as well as rotating my ball on that...

View Article

Can UnityEngine.Input be faked?

I'm using C# code which I am unable to change which relies on UnityEngine.Input. Is there any way for me to override the input to fake a button press or a mouse move so I can build automated UI tests?

View Article

getting element i+x from an array, looping through it

So, lets say I've got an array(a builtin array, but that doesn't really matter for the question) and I want to assign some values to the gameobjects in them. I get these values from another array, but...

View Article
Browsing all 171066 articles
Browse latest View live