Quantcast
Channel: Latest Questions by Yanger_xy
Browsing all 61 articles
Browse latest View live

How can i generate a terrain from discrete points

I wanna to generate the terrain by scripting. and the data source is not a hight map, but discrete points that generated by hard device GPS and saved in database, i have these points that with...

View Article


What's the difference between print() and Debug.Log()

What's the difference between print() and Debug.Log() ?

View Article


Can i Regenerate Terrain by assign terrain Data On GUI

hello, everyone. Can i Regenerate Terrain by assign terrain Data On GUI? First, i regenerate the terrain already in the scene by changing its heights. i.e by using the function SetHeights().And the...

View Article

how to assign texture on the terrain at runtime

I wanna to change terrain's texture when i hit a GUI button.the code below seems to doesn't work at all.how can i make it work?ps:i have loaded 2 textures on the 'Paint Texture'. and i reference the...

View Article

How to create a Mini Map at runtime

hi, guys. I wanna to create a mini-map at runtime, and i have some points that represent the road, and when the character moves, it is reflected to the mini map, how can i realize it? using the GL...

View Article


What's the difference between Normal and OnNormal in GUIStyle

Hello, everyone! I am confused about the difference between Normal and OnNormal and others like Hover and OnHover etc in GUIStyle, especially the OnNormal state, i do not know when i works. Just take...

View Article

Why my GL.Color doesn't work?

Hi, I wanna to draw a mini-map using the GL class, and first, i wanna to draw a semi-transparent background which is a quad and then draw some lines to represent the road in my scene.And i wanna to use...

View Article

GUI.Window error. InvalidOperationException: Hashtable.Enumerator: snapshot...

I wanna to draw a menu. and here is the code, but i come across a problem when i hit Play,and i find the error is caused by this line of code below:GUI.Window(GlobalGUIWindowId._WND2_YXY..... ,and the...

View Article


Very Very Big Terrain, how to show it?

Hello, everybody, i have a very very big terrain which is 5x5 Square Kilometers to show, and i set the terrain's resolution, width & length all to 1025 to adapt to the real world's terrain.I read...

View Article


how to draw a laneway/tunnel dynamically and simulate bombed hole

hello, everyone! I wanna to draw a laneway/tunnel dynamically and then bomb it, and i also want to simulate the bomb effect, when the bomb explode, there should be a hole and some other shatters on the...

View Article

How to understand Mesh.GetTriangles

I have read the offical document, but i am not fully clear now! Can you explain this for me? Any answer will be appreciate, thanks a lot!

View Article

How to align texture when comes to a corner

I draw a rect tunnel using Mesh, It all works well. What is the problem is:How can i align its texture with the tunnel.For example, when the tunnel turns off, the texture i assigned does turn at all by...

View Article

How to confirm the vertex of a mesh that mouse in and change its texture

Hello, everyone. How to confirm the vertex of a mesh that mouse in and change its texture, i wanna to draw a hallway with mesh dynamicly and there will be some bombs in the hallway, when the bomb...

View Article


GUI not work after building

hello, everyone! I create a 'menuframework ' using gui, it works well in debug mode,but after building it, the menuItem can not shown when i click popupMenu. here is the diagram: ![alt text][1] [1]:...

View Article

How to Control GUILayout.Window's Size

Hello,everyone. I wanna to draw a window with some other controls in it using GUILayout.Window, But i can not control the window's size, for it is a little small for my application after GUILayout...

View Article


How to input float in textfiled and and let the scrollbar change its value at...

Hello, everyone.I wanna to draw a Scrollbar and a textfield at the same time.And when the Scrollbar scroll, the textfield's value change with it, also, when the textfield's text changed, the Scrollbar...

View Article

GUI Elements' message handlling

Hello, everyone! I wanna to handle the GUI Controls' messages .for example, textField's KeyDown message. How can i realize it? Thanks a lot!

View Article


terrain split

Hello,everyone. I have to generate a very big terrain at runtime, it is too big to show. i wanna to split it and dynamicly load it.I have no idea now. Thanks!

View Article

Modal Dialog

Hello, everyone! I wanna to write a function that show a dialog window, the only method i thought about is that defining a global boolean variable to record whether we are showing a gui, if so, i must...

View Article

heightmapWidth and heightmapHeight always equal

heightmapWidth and heightmapHeight always equal, can't it not equal? i have a dem data which has 1013 columns and 980 rows, and i wanna to set terrain's resolution to 1013*980 so that 1 unit equals to...

View Article
Browsing all 61 articles
Browse latest View live


Latest Images