Quantcast
Channel: Latest Questions by Wrymnn
Browsing all 131 articles
Browse latest View live
↧

Raycast2D Stops at first object

Hi I have this script, but the RayCast2D stops at the first object it is inside (Mining laser attached to SpaceShip), so it basically stops at Spaceship. Vector2 direction =...

View Article


Emit ParticleSystem from given Position

Hi I have gameobject. It has attached particle System. I want to do lets say it will spawn its particles on given position. Lets say I get the reference to that particle system by: ParticleSystem...

View Article


Particle System size problem 2D

I use particle system for my laser when it collides with target. (2D setup) It works very much fine. I Instantiate particle system first with given weapon, and then move it to position and activate it...

View Article

Running more scenes in the background

Hi, How would I go about running more scenes in the background? Let`s take X3 space series into example. You have many systems, and you can trade from those systems, watch ships move there, even...

View Article

IsTrigger Collider2D - horrible FPS drop.

Hi there. I have Polygon Collider 2D on my enemy Sprites on Is Trigger. However, once two or more objects collide with each other, and one of them has Is Triggered (So they are inside each other) the...

View Article


Is this the best for performance?

Hello, I need to have health bars above enemies. There is a LOT of enemies in the map and I need the most optimized solution. I want to enable the OnGUI only when the camera is near enough to those...

View Article

Background Image in 2D

Hi, I want to make a background image, for example in 2D where there is starfield behind the ship. All the help I found on Answers is to create GUI texture... etc which doesn`t exist anymore. Do you...

View Article

Optimizing thousands of game objects

Hi there, Since I have started to develop my game, it went well, but now performance is my greatest enemy. Game is 2D top down space game. I can generate systems (everything in one scene) but the...

View Article


Transform.parent changes rotation/position 2D

Hi I am creating many 2D objects and I need them to be parent of the main Object_Spawner let`s call it so the hierarchy is clean. GameObject planet = Instantiate(planet_GameObject, pos,...

View Article


Change code at runtime

Does unity have some kind of debug tool? Or when I run the game, change some code, and the game will continue with changes I made WITHOUT resetting all variables and breaking the game. I know it has to...

View Article

Cannot reference object itself

This is kinda strange thing, or I just forget something. I spawn object B from object A. And I make object A parent of object B right after its Instantiation. - Now the problem is, when I try to access...

View Article

Updating code at runtime, without loosing all initialized variables

Hi there I know it is possible to update code at runtime in Unity3d. I run the game, change the code, save the script and the game updates itself. **- However my question is: Is there is option or way...

View Article

Checking area via code or detection collider

What do you think is better for performance? - Thousands of objects checking for enemies around via code? - Or thousands of objects checking for nearby enemies with its attached, say Circle collider?...

View Article


Visual Studio - Unity problems

I use Visual Studio 2013 Express for Desktops as my IDE. I set it in Unity preferences as my IDE instead of monodevelop. - However, when I upgraded to Unity 5, when I double click on any script, it...

View Article

GUI 4.6 won`t show on camera

No matter what I do, add button, Image, text, UI will NOT show on camera/screen. It did the first time, but camera was taking only lower left corner of main UI canvas. Like retarded..... I have set...

View Article


Android build - black screen for some devices

I have a problem where I get only black-screen after start up on android(4.4.2) for android build. I test it on Asus MEMO pad K013, here I get black screen. Then I run the same build on my Samsung...

View Article

Cannot reset animation

Hi, I have two states, the animation I want to play, and any state. When the animation should not play, there are 2 transitions controlled by one bool to go from NoState to animation, and from...

View Article


How to get this 2D glow effect?

Hi, how could I achieve similar orange glow effect to this? ![https://lh3.googleusercontent.com/-qAKOZbVFmI8/UtEooVJCUTI/AAAAAAAAA8I/WiZ7xi1PR9E/s1600/AsteroidBelts.png][1] I mean glow that is around...

View Article

Instantiate prefab in editor

Hi, I need to create/instantiate prefab in editor. I know you can use [ExecuteInEditMode] and then just Instantiate(), but that will create copy of the prefab. So when I change the prefab, this object...

View Article

How to use array in cg shader

I want to use array in my shader. I know how to pass value: shaderMat.SetFloat("_Sample0", 150); In my shader, I have declared: uniform float _Sample[2]; But when I try to access the values as...

View Article
Browsing all 131 articles
Browse latest View live


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