Quantcast
Channel: Latest Questions by Wrymnn
Browsing index pages (131 articles)

uNet - need method that is called before OnStartClient()

Hi, I need to call method to generate level before any **OnStartClient()** is called for on players (even Host). But not sure why **OnStartSever()** is not called first, but host`s **OnStartClient()**...

View Article


Asset Bundle big size

I am packing one Scriptable Object instance into asset bundle. On my disk, the scriptable object has 104kb. However, when I pack it into Asset Bundle, the final bundle has size of 4.5MB, why? I am sure...

View Article


Best way to handle separate collisions for mouse on all objects?

Hi, this is more of a design question than regular question. I have 3D game, camera is diablo style, top-down. Now, lets say item drops, its small amulet or wood or ring. The player will have problem...

View Article

Strange artifacts on Vertex Color Shader

I am using Vertex Color shader for coloring my generated mesh. I have a problem, when I want to reduce alpha of mesh color, e.g. for water, I get strange artifacts on the mesh. **Here is shot without...

View Article

Prevent raycast to OnMouseOver() or OnMouseEnter() when mouse over UI

As title says, it there anyway how to prevent Unity firing OnMouseOver() or OnMouseEnter() functions when mouse is over 4.6 UI objects? Note, this cannot be stopped with...

View Article


New Thread sometimes doesnt start

Has anyone experience issue where when you want to run some code in other threads, the threads won run or wont get created when you start the scene (Hit Play in Unity)? I am creating new Thread to...

View Article

How to free meshes from memory fast?

Hi, I work with chunks created from scratch in my game. - Every time new chunk is created, Meshes are added to memory. - Every time old chunk is removed, Meshes are not removed from memory. This is old...

View Article

Horrible lag when selection objects in Editor hierarchy

I have around 2000 objects in scene. Each 500 is parented under one parent, so 4 parents and 500 objects in hierarchy. *(I`m not talking about play mode)* In editor scene, when i select with mouse one...

View Article


.meta files not updating - SVN problem

I have a problem where one of the team members **changes prefab`s** sprite reference in it`s script, then saves the scene, saves the project. We look at **.prefab file and it updates properly**....

View Article


Render with GL lines under Sprites

I googled this problem, nothing I may use so far. I want to render lines inside **OnPostRender()** with **GL.Vertex3()** etc. commands. However, all **lines render Over every sprite**. - tried to...

View Article

Slow script recompile time

My scripts compile at least 40+ seconds when I make some changes. Which is ridiculous. Do you have any idea what may cause it? - Both Unity and Project are on same **SSD drive** - Using only C# - Have...

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

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 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

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


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

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


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

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

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
Browsing index pages (131 articles)


Latest Images