当前位置:网站首页>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 ");
}
边栏推荐
- Leetcode 222 number of nodes of complete binary tree
- QT Bluetooth: a class for searching Bluetooth devices -- qbluetooth devicediscoveryagent
- Is $20billion a little less? Cisco is interested in Splunk?
- 2022-2028 global and Chinese equipment as a Service Market Research Report
- 次小生成树
- An article takes you to thoroughly understand descriptors
- AutoCAD - lengthening
- How to choose a panoramic camera that suits you?
- Setting up redis cluster cluster under Windows
- [Chongqing Guangdong education] National Open University 2047t commercial bank operation and management reference test in autumn 2018
猜你喜欢
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
Use assimp library to read MTL file data
Introduction to JVM principle and process
A survey of automatic speech recognition (ASR) research
LeetCode之单词搜索(回溯法求解)
Emlog博客主题模板源码简约好看响应式
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
【Leetcode】1352. Product of the last K numbers
[groovy] closure (closure as function parameter | code example)
Emlog blog theme template source code simple good-looking responsive
随机推荐
QT Bluetooth: a class for searching Bluetooth devices -- qbluetooth devicediscoveryagent
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
Raki's notes on reading paper: code and named entity recognition in stackoverflow
Scope of package class package
AutoCAD - window zoom
Function template
China as resin Market Research and investment forecast report (2022 Edition)
Use assimp library to read MTL file data
Detailed introduction of OSPF header message
The first topic of ape Anthropology
Debug insights
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
Stage experience
How should programmers learn mathematics
【acwing】240. food chain
Leetcode 222 number of nodes of complete binary tree
Create a pyGame window with a blue background
AutoCAD - stretching
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
Qt蓝牙:搜索蓝牙设备的类——QBluetoothDeviceDiscoveryAgent