
Trouble shooting
- Pink material
- Install Universal RP in package manager
- Edit/Rendering/Materials/Convert…
- or what about try this fork
A prefab is a template for a game object that can be reused across multiple scenes. Using prefabs can help build scenes faster because a prefab can be created and then reused across multiple scenes without having to recreate the same game object each time.
To create a prefab, first create a game object in the Hierarchy window and add components and child game objects to it until it looks like the desired prefab. Then drag the game object from the Hierarchy window to the Assets folder in the Project window. This will turn the game object into a prefab that can be reused across multiple scenes.
An empty prefab can also be created by right-clicking in the Project window and selecting Create > Prefab, and then editing it in the Inspector window.
To instantiate an existing prefab in a script, first create a public variable in the script to reference the prefab, and then drag the prefab onto that variable in the Inspector window. For example:
1 | public GameObject myPrefab; |
The above code creates a public variable named myPrefab and uses the Instantiate method in the Start method to create an instance of the prefab. The prefab can be dragged onto the myPrefab variable in the Inspector window so that it is instantiated at runtime.
To instantiate a prefab from the Assets folder in a script, use the Resources.Load method to load the prefab and then use the Instantiate method to instantiate it. For example:
1 | void Start() |
The above code uses the Resources.Load method to load a prefab named MyPrefab from the Resources folder in the Assets folder and then uses the Instantiate method to create an instance of the prefab.
Note: To use the Resources.Load method, the prefab must be located in a Resources folder within the Assets folder.
动手能力对于公司创业初期有关键作用
基础研发实力决定公司后期发展(学科)
读书永远风险最低, 长线收益最高
李教授能搞项目是因为他可以带动硕博本,但本科生指挥不动人
以项目为导向,兼顾基础知识的课程
自上而下, 夯实基础原理的理解,而不是调参摁卷(某些竞赛就是源代码拿来然后使劲调参,钻牛角尖,不符合人才培养要求,无基础能力,适应力差)
某些创新的小比赛就比较好,能给自己的成果锦上添花
Starting point
The unity’s build-in physics engine PhysX is far from being precise enough for a vehicle simulator.
Through Asset Store
Starting point
The car model should be customizable, i.e. the user drag a car model into a directory and the game should be able to load it.
Filetype .glb is nice but unity doesn’t have build-in support
In tactics project:
1 | git submodule add https://github.com/Siccity/GLTFUtility.git ./Tactics/Assets/ThirdParty/GLTFUtility |
1 | using Siccity.GLTFUtility |
here I use Application.streamingAssetsPath+"/Model/"+JsonReader.vehicle.model.carBody[0].dir
as filepath
ArgumentNullException: Value cannot be null. Parameter name: shader
Save
and Model
folders?Application.streamingAssetsPath
, stands for Assets/StreamingAssets
in Unity editor and Game_Data/StreamingAssets
in exported game.First construct the structure of the json file in c#.
Notice: the name of the member variable should be the same with those in json file
1 | [System.Serializable] |
Notice: [System.Serializable]
is for serialized display in Unity editor.
Then, directly use build-in json loader:
1 | VehiclePara vehicle; |
All the parameters will be stored in the instance vehicle
.
1 | flowchart RL |
1 | { |
1 | sudo dpkg -i *.deb |
1 | chmod +777 *.AppImage |
1 | sudo apt -f install |
See all the process:
1 | ps aux |
Find the target pid
1
pgrep [partial name]
return the pid of the process
kill the process
1
kill [pid]
Search for confirmed strings in file
1 | grep [option] [pattern] [file] |
display the battery percentage
1 | upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage |
SSH (Secure Shell) is a network security protocol that provides secure access and file transfer through encryption and authentication mechanisms. It encrypts and verifies network data to provide secure login and other secure network services.
SSH uses a combination of public and private keys to secure communication. The public key is used to encrypt data, while the private key is used to decrypt data. This ensures that even if data is intercepted during transmission, attackers cannot decrypt it, ensuring data security.
An SSH agent is a program that stores private keys and can help you avoid having to enter your passphrase every time you use SSH. When you add a private key to an SSH agent, you only need to enter the passphrase the first time you use the key. After that, the SSH agent will automatically provide the private key for you.
You can use the ssh-keygen
tool to generate a new SSH key pair. Here’s an example of how to use ssh-keygen
to generate an RSA key pair:
1 | ssh-keygen -t rsa -b 4096 -C “your_email@example.com” |
In this command:
-t rsa
specifies the type of key to create. In this case, we’re creating an RSA key.-b 4096
specifies the number of bits in the key. In this case, we’re creating a 4096-bit key.-C "your_email@example.com"
adds a comment to the key. This can be any text you like, but it’s common to use your email address.After running this command, ssh-keygen
will prompt you for a location to save the key pair and for a passphrase to secure the private key. You can accept the default location by pressing Enter, or you can specify a different location if you prefer. If you don’t want to use a passphrase, you can leave it blank by pressing Enter.
On Ubuntu, you can add a key to the ssh-agent
by following these steps:
ssh-agent
is running. You can start it by running the eval "$(ssh-agent -s)"
command.ssh-add ~/.ssh/id_rsa
command to add your first key (the one you commonly use) to the ssh-agent
. If your key file is not in the default location (i.e., ~/.ssh/id_rsa
), replace the path in the command with the actual path of your key file.After completing these steps, you have successfully added your first key to the ssh-agent
. Now when you use SSH to connect to a remote server, the ssh-agent
will automatically provide your private key.
On Ubuntu, you can view the keys added to the ssh-agent
by running the ssh-add -l
command. This command lists the fingerprints of all keys in the ssh-agent
.
magma-nvim
Magma is a NeoVim plugin for running code interactively with Jupyter.
Jupynium.nvim
It’s just like a markdown live preview, but it’s Jupyter Notebook live preview!
Jupynium uses Selenium to automate Jupyter Notebook, synchronising everything you type on Neovim.
Never leave Neovim. Switch tabs on the browser as you switch files on Neovim.