当前位置:网站首页>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 ");
}
边栏推荐
- [goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
- Fluent objects and lists
- Detailed explanation of the ranking of the best universities
- 中国溶聚丁苯橡胶(SSBR)行业研究与预测报告(2022版)
- 2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
- Is $20billion a little less? Cisco is interested in Splunk?
- The difference between bundle, chunk and module
- windows下Redis-cluster集群搭建
- 数论函数及其求和 待更新
- How to choose a panoramic camera that suits you?
猜你喜欢
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
2022-2028 global and Chinese virtual data storage Market Research Report
669. Prune binary search tree ●●
JVM 原理和流程简介
数论函数及其求和 待更新
Rip notes [rip message security authentication, increase of rip interface measurement]
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
Qt蓝牙:搜索蓝牙设备的类——QBluetoothDeviceDiscoveryAgent
A survey of automatic speech recognition (ASR) research
LeetCode之单词搜索(回溯法求解)
随机推荐
Inline built-in function
Stage experience
windows下Redis-cluster集群搭建
"Measuring curve length" of CAD dream drawing
AutoCAD - set layer
Mode in BST (binary tree & Notes on question brushing)
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Autocad-- Real Time zoom
The difference between bundle, chunk and module
Redis 排查大 key 的4种方法,优化必备
On-off and on-off of quality system construction
2021 electrician cup idea + code - photovoltaic building integration plate index development trend analysis and prediction: prediction planning issues
2021 huashubei mathematical modeling idea + reference + paper
Function overloading
Reading and visualization of DICOM, MHD and raw files in medical imaging
[groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
中国金刚烷行业研究与投资预测报告(2022版)
Neural networks and deep learning Chapter 5: convolutional neural networks reading questions
Setting up redis cluster cluster under Windows