当前位置:网站首页>Unity3d learning notes
Unity3d learning notes
2022-07-05 04:51:00 【shixch】
Specify the location of the object :
using UnityEngine;
public class Box : MonoBehaviour
{
public GameObject first;
// Start is called before the first frame update
void Start()
{
first.transform.position =new Vector3(first.transform.position.x,1.5f,
first.gameObject.transform.position.z);
print("x The coordinates of are :"+first.gameObject.transform.position.x);
print("y The coordinates of are :"+first.gameObject.transform.position.y);
print("z The coordinates of are :"+first.gameObject.transform.position.z);
}
// Update is called once per frame
void Update()
{
}
}
-----
public void tuichu() // Exit app
{
Application.Quit();
}
-----
Create a new one 『 Button 』, Create a new script , Give the script to the button ,
public void Click_test_s() // Prompt window
{
UnityEditor.EditorUtility.DisplayDialog(" title ", " Prompt content ", " confirm ", " Cancel ");
}
边栏推荐
- How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
- Debug insights
- Research and investment forecast report of adamantane industry in China (2022 Edition)
- How should programmers learn mathematics
- Special information | finance, accounting, audit - 22.1.23
- English topic assignment (27)
- [groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
- AutoCAD - lengthening
- windows下Redis-cluster集群搭建
- Download the details and sequence of the original data access from the ENA database in EBI
猜你喜欢
Number theoretic function and its summation to be updated
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
How to choose a panoramic camera that suits you?
Manually implement heap sorting -838 Heap sort
Setting up redis cluster cluster under Windows
Rip notes [rip message security authentication, increase of rip interface measurement]
AutoCAD - window zoom
Matplotlib draws three-dimensional scatter and surface graphs
AutoCAD - command repetition, undo and redo
AutoCAD - feature matching
随机推荐
China needle coke industry development research and investment value report (2022 Edition)
2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
Redis 排查大 key 的4种方法,优化必备
775 Div.1 B. integral array mathematics
Debug insights
Rk3399 platform development series explanation (network debugging) 7.29 summary of network performance tools
计组笔记(1)——校验码、原补码乘除计算、浮点数计算
Detailed explanation of the ranking of the best universities
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
Emlog博客主题模板源码简约好看响应式
On-off and on-off of quality system construction
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
Number theoretic function and its summation to be updated
Séparation et combinaison de la construction du système qualité
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
Download the details and sequence of the original data access from the ENA database in EBI
How should programmers learn mathematics