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

Change variable if light.intensity is higher than 0

I'm trying to make all the lights go out, on an object, if the light.intensity is higher than 0 on my main light source (directional light). private var on = false; var lamp =...

View Article


InvokeRepeating doesnt seem to be working...

Hi folks. I'm attempting to use invokerepeating to increase an int (minutes) by 1 every second. But it just flat out isn't working. Could anyone take a look at my code and see if they can figure out...

View Article


Bind event handler to instantiated prefab

I have a class player. In the class I've defined a method to Instantiate a new player. I've also created a collision method. I'm trying to wire up the event to a new prefab in the Instantiate method....

View Article

Euler Angle problem in If check

I am rotating my object by 90 degree over some time according to the following code. `thisTransform.RotateAround (thisTransform.position, degrees, 90*Time.deltaTime);` What I want to do is when the...

View Article

Problem with flocking Algorithm

I'm trying to make a flocking algorithm so that a group of creatures will flock together. This algorithm has 3 parts to it: keeping the creatures close to eachother, avoiding them from being too close,...

View Article


translated script from C# to JS; GUI not working properly?

I followed a script from a tutorial, but I wanted to convert it to JS, and, when I do so, the GUI elements don't working properly. I'm trying to make a level bar and an experience bar, and the...

View Article

Shader for Global illumination via vertex array

Hello, dear Unity community I'm new to shaders, but hope someone can help me. I think that solution for this theme can be found via shaders (If there is some other solution, please tell me). What we...

View Article

Changing background, font and style of buttons

i am developing a GUI for my game, but i cannot find any way of changing my background(putting a custom image), also when i am trying to change the font and style of a button text the button border is...

View Article


In an open world game, how big should texture atlases be?

Should they be limited to the relating parts of objects? Should they be all of the structures? The entire games textures? **At what point is a atlas more costly than helpful in this type of game?** I'm...

View Article


repeating textures on procedurally generated plane mesh

So, I've procedurally generated a mesh. This is just a plane polygon made up on n faces. I understand how to uv map a texture onto this shape, but I would like be able repeat the texture rather than...

View Article

Unload Resources

Let's say i've a gameobject which has a compoment with a used resource. I set the gameObject to inactive, but later i'd like to set it to active I call Resources.UnloadUnusedAssets(); Does it delete...

View Article

Line on terrain where light stops

I would appreciate some help with this problem I'm having with my terrain. I have a campfire in a forest area and when the light from that get's to a certain point, the light stops rendering for some...

View Article

Light switches and Trigger distance.

Basically i have searched over the mighty realm of google and i still have not found an answer to this. my question involves a light switch and a box collider marks as trigger. the script works but, i...

View Article


Integrating GlovePIE in unity

I know there were a couple of posts about this in the past (the last one being in 2010), but they're all dead posts and noone is willing to answer anymore so I decided to try and bring up the topic...

View Article

2D Modular Customization With Snapping

Hey :) This might be quite a long and ambiguous question to ask, but after looking around a lot I am still pretty stuck so I'll just give it a go anyway :P The general idea is that the user can click...

View Article


shooting multiple enemies using raycast

im having problems with shooting multiple enemies, i had no problem with one but as soon as i've duplicated the enemy ive opened up a whole world of problems it seems... i have attached the script in...

View Article

Save object(xml) to array

Hello community! I'm dealing with saving to XML , but having problems with building an array which is then written to XML, i have no experience at all with working with XML and not that much with...

View Article


Load Level on hitting/colliding Monster

First I used this script to load te level function OnTriggerEnter (other : Collider) { { Application.LoadLevel(3); } But that didn't work because it always loads the level. Then I added the line: If...

View Article

Spawn Script Assistance?

I have recently asked for help on how to have a script where I have 10 to 12 spawn points as empty gameobjects around the map and adding tags to 8 of my objects as "SpawnPoint" and the script would...

View Article

Vertex colours not blending across triangle face

Assigning colours to vertices of procedurally generated mesh. Noticed the colours seem very 'polarized' around the vertex and not blended evenly along the face of the triangle. Is there a setting I'm...

View Article
Browsing all 171066 articles
Browse latest View live


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