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

Help with JS Game

Hi, I'm building my first game in Unity with Javascript that is 2d. I currently can get everything, but my code right. I have been working with some different code editors such as Notepad++ and...

View Article


Why Built in array keeps data when switching scene ?

**Hello!** I have a prefab which has a script. The script has a code which at **start()** scans all objects with **FindObjectsWithTag** function and adds (using **for()** cycle) specific 4 objects at...

View Article


Trying to build game in JS

Hi, I've been building a math game for 4th graders that would be 2d. I currently have been to finish the physical part of the game but my coding is a bit messed up. Whenever I try to run this script in...

View Article

How to create a time bomb in Unity?

I am making a small arcade game, and I am trying to randomly instantiate a bomb that will explode after a while. But, when it explodes, it doesn't add the explosion force. Here is the code: using...

View Article

Gameobjects move towards a moving object c#

I'm trying to get the following gameobjects to move towards another (my player), the only problem is with the following code, they only move towards its starting position. Where as I want them to be...

View Article


CS0103 Error

Having an issue with creating a State Machine. In my states, the variable, 'manager' doesn't exist in the current context. I'm not sure why it isn't grabbing it from the BeginState. **StateManager:**...

View Article

Mecanim model imported for legacy asset kit, beginner help plz

I bought the "Toon Character Pack" models which use mecanim and the AGK kit which uses legacy. Can I still import these models and animations in for the legacy kit? I tried to import it and just use...

View Article

Array index out of range when access from another scrip

I'm trying to access an array from another script in C# but it always give me index out of range error. script1.cs (attached to mainCamera named MC) public int[] testArray = {1,2,3,4}; script2.cs...

View Article


C# Start Menu building

Hello guys/girls, Finally found out how to write a start menu script with the build in gui system. However I'm running into a problem. When I click the options button my options menu appears. But when...

View Article


Seamless UV textures

So I modeled a piece of a road in Blender. Made the texture in gimp and applied the 'seamless' filter. It *almost* works, but not quiet. ![alt text][1] [1]: http://puu.sh/6Bv2L.jpg I've fooled around...

View Article

Fixed joint 2D

Why is there no fixed joint 2D? I want to connect some 2D physics objects with fixed joints, which are supposed to be break-able. How do I achieve this if there are no fixed 2D joints? Parenting? Any...

View Article

How to instantiate everything inside an Array?

Hi, I have an array of gameobjects. Onstart I would like all of these objects in the array to be instantiated. Although this script is attached to several other items so the amount in the array is not...

View Article

Shadow anomoly

Here is a very strange artifact. This is Pro version. I have a point light above in the scene and the waste basket object is a solid piece of geometry. No holes in it. Note the hole in the shadow...

View Article


Audio won't play

Hey. I am trying to do some platformer 2D game, so i have my movement done yet, and i want to write script for picking up coins. Destroying object on collision works perfect but audio wont' play no...

View Article

Has anyone done ROS (Robot OS) integration with Unity?

Wondering if anyone has integrated Willow Garage's ROS with Unity, in any way, but preferably on Windows?

View Article


Parent an object to the camera via script?

I have a script so far and I want it to send a raycast out to an object and then attach that object to the main camera - like in Skyrim and Portal etc. I know I will have to do something else to make...

View Article

Make 3D mode default in scene instead of 2D?

Hello, I started a project in 2D and eventually switched to 3D. Now everytime I run the game and stop it, the scene switches to 2D view. How can I set the default mode to 3D again? Feels like I tried...

View Article


Does Unity 2D tools generate atlas?

Couldn't find any option to bring different sprites and generate an atlas directly in unity. Is it possible? Where? I can't find any tutorial. Thanks.

View Article

Need Help with 2D raycast

Hello everyone. I am working in a 2D space shooter, so my idea is to have 2D sprites alongside some 3D models as enemies. I have arranged player moving and some AI behavior, like turrets rotating...

View Article

Ensuring that a button is released before checking that it's pressed?

Evening, guys. I'm attempting to implement a fancy attack combo thing where, when you press the attack button during an attack, it'll execute the next attack in the chain once the first is finished. In...

View Article
Browsing all 171066 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>