Most voted "unity3d" questions
Unity 3D or Unity is a proprietary 3D game engine and an IDE created by Unity Technologies.
Learn more…292 questions
Sort by count of
-
3
votes1
answer745
viewsHow to create the game floor with a random Prefab
To create the floor, I did it this way: I created a gameobject and then assigned an Sprite render, box Colider, rigidbody 2d and a script. I created a Prefab and dragged the gameobject that I set up…
unity3dasked 9 years, 5 months ago Filipe Moraes 8,737 -
3
votes1
answer520
viewsIs it allowed to use free sprites from the Unity Asset store in monetized games?
Is it allowed to use free sprites from the Unity Asset store in monetized games? I saw that the Unity Asset Store has many sprites that are free. I was thinking of starting to develop some simple…
-
3
votes0
answers88
viewsUnity - Identify texture in Terrain X Y location
I have a Terrain in Unity, and I was wondering if you have any way to identify what the texture is in a certain XY position in Terrain. Example:…
-
3
votes1
answer194
viewsUnity 5 - Shoot up, Enemy ship does not shoot
The enemy ship simply can’t shoot and walk at the same time, or it does one or the other. public class EnemyScript : MonoBehaviour { public float speed = 5f; // Use this for initialization void…
-
3
votes2
answers810
viewsSqlite Database does not work on Unity Games compiled for Android
I’m using the Sqlite as a game database made in Unity that works perfectly on Unity Editor, but when I build for Android the game simply does not access the bank (nothing is informed or released).…
-
3
votes2
answers499
viewsDefine a generic variable without defining the type
I’m doing some tests on Unity so I can practice programming. I’m new and this question can be kind of stupid. I want to know if this is possible: I created the following abstract class: public…
-
3
votes1
answer140
viewshow to change the material of an onclick object
I am using unity3d, I have a Prefab of a sphere and another of a cube, with a simple material and I would like to know how I can change the material of these objects by clicking a button on UI.…
-
3
votes2
answers1124
viewsc# - Unity - Error: Object Reference not set to an instance of an Object
I’m a beginner in C#programming, and I’m trying to learn how to make a 2d sidescroller game, but I couldn’t move forward from a part of the tutorial. This is because the camera simply doesn’t follow…
-
3
votes1
answer567
viewsUnity3d: How can I move Gameobjects from the same script independently?
I created a script in Unity3d that makes a GameObject move in a sinusoidal way. The movement occurs perfectly, but when more than one GameObject containing this script is on the scene all move like…
-
3
votes1
answer1337
viewsHow to move and rotate where the mouse click is?
I created a script in which my character moves through click of mouse but there’s a problem: it’s not spinning in position Y, this is the condition I had to create for it to Rotacione on the axis X:…
-
3
votes2
answers105
viewsHow to change the value of several variables of the same type, for the same value, at once?
I was wondering if there’s any way to change several variables of the type bool for the same value, true or false, all at once? I have several methods that are similar and do the same thing, only…
-
2
votes2
answers9832
viewsTransform Rotation with Unity3d
I’m wanting to develop a game (starting studies now), and I’m having a hard time: I have a scenario that is basically a planet and on this planet I can put objects that will "aim" at the player...…
-
2
votes0
answers390
viewsUnreal Engine 4, Cry Engine or Unity for networking
I need to choose between these 3 Engines in order to develop my game in 3D. The main point is that I need to connect the client to a server written in Scala with Akka through TCP. I saw that they…
-
2
votes1
answer306
viewsWhat is the difference and advantages of SDL and Unity3d
I wanted to know the main difference between SDL and Unity3d in terms of performance and ease of use and when one is more suitable than the other.
-
2
votes1
answer2341
viewsHow to put a soundtrack?
I’m playing a mobile game on Unity but I’m not able to put a soundtrack, the sound file has already been converted, but I don’t know the right command to start playback of the soundtrack I’ve tried…
unity3dasked 10 years, 1 month ago Christian Machado 23 -
2
votes1
answer1182
viewsNavmesh Asset format has changed. Please rebake the Navmesh data
I tried to turn the game into an executable using the following path: File/Build Settings/Pc,Mac../Build and Run. I tried several different ways and have the same problem: Enemies do not appear.…
unity3dasked 9 years, 10 months ago Claudemir da Silva 51 -
2
votes1
answer314
viewsUnity does not update frames when rotating the character with mouse movement
My Unity is not giving error, or anything. Everything is OK, but the character does not move. I’ve looked at the code and no mistakes, I move the mouse and nothing happens to the character. Unity…
-
2
votes1
answer13084
viewsUnity - Error: Object Reference not set to an instance of an Object - Instantiate
I made the Survival Shooter tutorial that can be found in the Unity Asset store at https://www.assetstore.unity3d.com/en/#! /content/21028 The game is working, but is giving this following error in…
-
2
votes1
answer105
viewsHow to make the gun disappear in the same key that makes it appear in UNITY
using UnityEngine; using System.Collections; public class SelecteArma : MonoBehaviour { public bool Equipamento = true; void Start () { } void Update () { if (Input.GetKeyDown ("1")) {…
-
2
votes0
answers776
viewsError generating application for android with Unity
I created a "game" and I’m willing to do build for android devices... but I’m getting the error: Error building Player: Win32exception:…
-
2
votes1
answer57
viewsOnmouseup() method does not work in unity4
Hello! I’m new to Unity and I can’t make the Onmouseup() method work using UnityEngine; using System.Collections; public class touch : MonoBehaviour { void OnMouseUp() { Debug.Log("Drag ended!"); }}…
-
2
votes2
answers111
viewsI’m not getting wheel the first animation of my game
Good afternoon I’m having a hard time understanding what that mistake would be I still have a few days in the programming world someone can help me using UnityEngine; using System.Collections;…
-
2
votes1
answer95
viewsMethod that counts the frames of a C#Augmented Reality scene
I am doing a work of Augmented Reality using Unity and Vuforia and I need to capture how many frames the scene I develop is using, I do not master much of C#, but by my research apparently Unity has…
-
2
votes1
answer244
viewsMethod to take life of the Player does not work
I’m making a script for take the player’s life when something collides with it, I’ve reviewed the code dozens of times and can’t find the error. The collision code is tied to the enemies:…
-
2
votes1
answer786
viewsMake Animated Screen Loading - Unity 5.1
I’m having problems to make a Loading Screen for my game, the game is a little big so it takes some time to load, even more because it is a mobile game. At the moment I’m trying to do so: public…
-
2
votes1
answer114
viewsI’m creating a queue, and I can’t develop function logic for the previous object to assume the new position released - C#
I’m using unity3D, so my queue consists of Gameobjects, are 7 Gameobjects lined up next to each other and my purpose with this code is that every click of the user - "Simplemove function" - the…
-
2
votes1
answer1725
viewsHow to test an app created on Unity for Android in a logcat emulator like in Android Studio?
In the unity developing for Android, it does not test exactly as in an emulator like Android Studio. I know you can generate one apk and test on the physical device, but I wanted to test on an…
-
2
votes2
answers268
viewsHow do I limit the rotation of prefabs on 2 axes in Unity?
I need a Prefab to stop spinning when it reaches 2 positive values in Y. In case it reaches 65º. My code is like this, only it’s not working. private float m_MaxYRotation = 65f; private float…
unity3dasked 8 years, 11 months ago Julia Chaves 71 -
2
votes1
answer182
viewsNightmares character does not move
I’m having a problem in the game Nightmares. My character doesn’t move just makes the animation of Idle. The script There you go and there seems to be no mistake. public class PlayerMovement :…
unity3dasked 9 years, 6 months ago pedrofarah 33 -
2
votes0
answers428
viewsHow to make a DLC-like update with Unity
Hello! I would like to know if it is possible, create an update for a game (IOS/Android) type DLC, ie the user will have the option to include this extension to his current game. I have tested with…
-
2
votes0
answers700
viewsSet up camera for 2D games for android
I made a test game for gadgets with Android. However when testing on a device, the game was all distorted, squeezed on the screen. On the computer, when testing the game I made a screen width print…
unity3dasked 9 years, 5 months ago Filipe Moraes 8,737 -
2
votes1
answer189
viewsUnity failed to load Vuforia library
Guys, I have a problem with Unity 5 and Vuforia 4. I’m trying to run the example I found here. Every time I try to run the test it throws the following errors: Error 1: Failed to load…
-
2
votes1
answer63
viewsHow to make a GIF loop while the next scene loads
Hello, I searched some topics on the internet, but nothing did exactly what I wanted, and my little knowledge in Unity does not allow me to adapt the codes. I have a scene GUI that has a button…
unity3dasked 8 years, 1 month ago Lucas Caresia 2,663 -
2
votes1
answer737
viewsUnity open external link
By placing the Unity file on the page I cannot redeploy the action to another page. What happens is that the new page opens inside the "frame" for the Unity file. using UnityEngine; using…
-
2
votes1
answer45
viewsUnityengine.Debug error:Log(Object)
Personal my app is ready and when I compile it, it getting this error: Unityengine.Debug:Log(Object) How do I stop receiving this error? Don’t compile, it stops at this. Does anyone know why he…
-
2
votes1
answer417
viewsUnity: How to navigate between two points on a sphere?
I need to create a navigation system between two points in a sphere, the problem is that as the Unity Navmesh does not work with spherical objects I have to calculate and manually position the…
-
2
votes2
answers1187
viewsWhat is the purpose of the Assets directory?
I’m starting to learn about Unity, and in my first project I came up with a question about the directory Assets. It contains some files that are C# game scripts, and other extension files *.asset…
-
2
votes1
answer31
viewsGet/Calular edges of a 3D object
I have the following question regarding obtaining the positions of a certain edge of a 3D object. Example, I have a track (car game) and I want to calculate, through a script C#, both sides of the…
-
2
votes2
answers1012
viewsDrive with 2D Touchscrren
I need to make a C#Script code for moving a 2d character in Unity. I developed a code that runs well on the pc using arrows, but I have no idea how to make it move using the touchScren of an Android…
-
2
votes2
answers1197
viewsCollision and Unity 3d reaction
I have a doubt in a script, I am creating a game made in Unity 3d. The doubt and the following, as I do to identify the collision between 2 objects and add a jump action to one of these objects, if…
-
2
votes1
answer1014
viewsHow to keep audio from one scene to another in Unity
I need help. I’m playing a 2D game at Unity. And I would like to know how to keep the audio (background music) from one scene to another and that it continues where it left off. And also how I would…
-
2
votes1
answer55
viewsHow do you stop emitting particulates after a few seconds?
I have a simple code that spawnes particles when the player is stationary on Rigger. But they don’t stop broadcasting and I’d like them to stop right after a few seconds. How can I do that? if…
-
2
votes3
answers159
viewsDoubt how to capture the character’s animation in Unity
I’m trying to make a command that activates an animation when I press 2 keys of Keyboard and when I stop pressing one of them, this animation stops. For example I chose the "w" + "leftShift" key,…
-
2
votes1
answer306
viewsPlayerprefs Unity3d
I’m developing a game for android but I’m having a hard time saving the type of input. For example in this game the user can choose whether to play on touch or accelerometer, in Unity + remote works…
-
2
votes2
answers1639
viewsHow to Instantiate an Object in C#
How do I instantiate an Object in another class? I’m trying this way: GameObject Cozinha = new GameObject("CenaCozinha"); CenaCozinha coz = Cozinha.AddComponent<CenaCozinha>(); But I believe…
-
2
votes0
answers157
viewsHow to change an existing "Game Object"?
I’m starting now with Unity3d and for that I took the example that comes with the package, the car.unity. I read a lot of documentation, but I couldn’t do something very simple... How to change the…
unity3dasked 8 years, 3 months ago Camila Yamamoto 1,302 -
2
votes1
answer71
viewsthe local variable `Texture' cannot be declared in this Scope because it will Give a Different Mean to Texture
I’m new to c# script in unity3d I get an error in EditorFacebookMockDialog.cs: the local variable `Texture' cannot be declared in this Scope because it will Give a Different Mean to Texture how can…
-
2
votes0
answers283
viewsCreate an ellipse / circle in Unity + C# - using Point3d and Virtualdraw
I need to implement a Unity project, creating an ellipse. In the project there is already the code of creation of "line" and "rectangle" that works perfectly. The project is for a master’s degree…
-
2
votes0
answers48
viewsDesign Patterns Unity3d?
Good morning, I started working with Unity3D, everything was going well, until I saw my codes become GIANTS, so I decided to separate everything well in a design pattern ""I created three layers to…
unity3dasked 7 years, 3 months ago gabrielgrs 457 -
2
votes1
answer346
viewsLoad list from txt in c#
I have the following problem, I get the data from a txt that I need to return in the form of List<List<string>>, but I can only catch from the txt one string [] linha, so I was adding…