当前位置:网站首页>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 ");
}
边栏推荐
- AutoCAD - workspace settings
- 2021 huashubei mathematical modeling idea + reference + paper
- Minor spanning tree
- 775 Div.1 B. integral array mathematics
- Difference between singleton and factory pattern
- 2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
- [ideas] 2021 may day mathematical modeling competition / May Day mathematical modeling ideas + references + codes
- 54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
- [groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
- [crampon programming] lintcode decoding Encyclopedia - 872 termination process
猜你喜欢
介绍汉明距离及计算示例
AutoCAD - isometric annotation
Use assimp library to read MTL file data
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
Reading and visualization of DICOM, MHD and raw files in medical imaging
AutoCAD - continuous annotation
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
2022-2028 global and Chinese FPGA prototype system Market Research Report
LeetCode之单词搜索(回溯法求解)
"Measuring curve length" of CAD dream drawing
随机推荐
Manually implement heap sorting -838 Heap sort
The 22nd Spring Festival Gala, an immersive stage for the yuan universe to shine into reality
AutoCAD - stretching
Download the details and sequence of the original data access from the ENA database in EBI
History of web page requests
Wan broadband access technology V EPON Technology
Construction d'un Cluster redis sous Windows
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
Advanced length of redis -- deletion strategy, master-slave replication, sentinel mode
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
mysql审计日志归档
669. 修剪二叉搜索树 ●●
Data security -- 14 -- Analysis of privacy protection governance
Error statuslogger log4j2 could not find a logging implementation
Flink cluster configuration
Scope of package class package
Solution of circular dependency
次小生成树
Use assimp library to read MTL file data
AutoCAD - Zoom previous