Answers for "can i use c++ in unity"

C#
1

How do i destroy a prefab without the error?

//You could try making a copy

public GameObject example;


GameObject exampleCopy = example
Instantiate(exampleCopy, //wherever you want)
Destroy(exampleCopy)
Posted by: Guest on February-16-2020
0

c++ in unity

I would recommend you to use/learn c# for unity. Its way easier. 
Else I recommend you to do it with the Unreal Engine 5.
Posted by: Guest on June-06-2021
0

how do i limit the amount of prefabs in unity using c# script

int maxEnemy = 50; int enemyCount = 0;  void Spawn() {     if(enemyCount >= maxEnemy) return;     // Instantiate     enemyCount++; }
Posted by: Guest on January-26-2020

C# Answers by Framework

Browse Popular Code Answers by Language