Traditional Culture Encyclopedia - Photography major - How to set the camera size of 2d camera in unity
How to set the camera size of 2d camera in unity
Public? Class size: single behavior
{
//speed
Public floating? ChangeSpeed = 0.5f
Private floating maximum =? 13;
Private floating minimum =? 7;
Invalid update ()
{
What if? (enter. GetAxis ("mouse wheel")! = 0)
{
//Limit size
Camera.main.orthographicSize? =? Mathf。 clamp(camera . main . orthographicsize,minmum,maximum);
//Wheel replacement
Camera.main.orthographicSize? = ?
Camera.main.orthographicSize? -Input. Gaitacus
("mouse? scroll wheel ")* change speed;
}
}
}
Unity is a cross-platform 2D/3D game engine developed by Unity Technologies:
It takes interactive graphics development environment as the main way, and the compiler runs under Windows and Mac OSX, and can publish games to various platforms such as Windows, Wii, OSX, iOS or HTML5. In addition, Unity is a comprehensive creative tool, which is widely used in architectural visualization, real-time 3D animation and other types of interactive content.
- Previous article:Spring has come. The composition is great.
- Next article:Can Sony a7s3 make movies?
- Related articles
- Has Fuping Laomiao Pumped Storage Power Station started?
- What are children's idioms and their meanings?
- What time does Zhengzhou film selector get off work?
- Shanghai Tianli Film and Television Culture Studio recruitment information, how about Shanghai Tianli Film and Television Culture Studio?
- Compared with SLR cameras such as Canon Nikon, Leica S and Hasselblad are hundreds of thousands easier, and a lens needs tens of thousands of SLR cameras. What are the advantages?
- What is the most beautiful love poem in the world?
- What are the interesting scenic spots in Qingyuan? What are the interesting scenic spots in Qingyuan? Recommended winter.
- Must-see attractions in Pingtan Island
- How about a camera for Valentine's Day?
- How to get to Luoning from Luoyang high-speed railway station?