当前位置:网站首页>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 ");
}
边栏推荐
- 2021 electrician cup idea + code - photovoltaic building integration plate index development trend analysis and prediction: prediction planning issues
- MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
- #775 Div.1 C. Tyler and Strings 组合数学
- Detailed explanation of the ranking of the best universities
- 中国AS树脂市场调研与投资预测报告(2022版)
- Matplotlib draws three-dimensional scatter and surface graphs
- Rk3399 platform development series explanation (network debugging) 7.29 summary of network performance tools
- mysql審計日志歸檔
- The difference between bundle, chunk and module
- 【Leetcode】1352. 最后 K 个数的乘积
猜你喜欢
A survey of automatic speech recognition (ASR) research
windows下Redis-cluster集群搭建
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
AutoCAD - command repetition, undo and redo
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
Solutions and answers for the 2021 Shenzhen cup
随机推荐
Manually implement heap sorting -838 Heap sort
[crampon programming] lintcode decoding Encyclopedia - 872 termination process
Chapter 6 text processing tools for shell programming (awk)
The difference between bundle, chunk and module
【acwing】836. Merge sets
MD5 bypass
Neural networks and deep learning Chapter 2: machine learning overview reading questions
Raki's notes on reading paper: code and named entity recognition in stackoverflow
How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
Debug insights
MySQL audit log Archive
Wenet: E2E speech recognition tool for industrial implementation
2022-2028 global and Chinese equipment as a Service Market Research Report
AutoCAD - scaling
Séparation et combinaison de la construction du système qualité
CUDA Programming atomic operation atomicadd reports error err:msb3721, return code 1
Use assimp library to read MTL file data
775 Div.1 B. integral array mathematics
AutoCAD - workspace settings
49 pictures and 26 questions explain in detail what is WiFi?