hi guys,I want to achieve the following functions:
show 3d model in window ,and control it。
hi guys,I want to achieve the following functions:
show 3d model in window ,and control it。
If you mean show a Unity game in a web browser window, then you’re all set. You can control the size of the game client “window” within the browser page using the Player settings, accessed from the Edit > Project Settings menu in the Unity Editor.
If you mean show a 3D sub-scene as a viewport within your Unity game, that’s easy too – create a second camera for sub-scene, set its viewport rect to control placement on the screen, and use the Culling Mask to control what it renders.
(And if you mean something else then please clarify your question.
Show 3d model in window
Create a hidden place in the scene that player will never see
Place your 3D model in it
Place a camera facing the model
Adjust the following parameters, so the view of camera will display on your window. You can use script to disable camera when your window is closed.
Normalized View Port Rect Four values that indicate where on the screen this camera view will be drawn, in Screen Coordinates (values 0-1).
X The beginning horizontal position that the camera view will be drawn.
Y The beginning vertical position that the camera view will be drawn.
W (Width) Width of the camera output on the screen.
H (Height) Height of the camera output on the screen.
Control 3d model in window
Lots of ways to control model. One way is, in case you don’t know, use character controller.
http://unity3d.com/support/documentation/Components/class-CharacterController.html
Thanks all.
I want to achieve the functions like WOW property window。
if use the Culling Mask to control what it renders, how to move the window?
This will just display it EditorUtility.GetAssetPreview. Found it after 300+ lines of coding to do the same thing