What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-09 22:25:06
get random file in directory c#
using System.IO; using System.Collections; var files = Directory.GetFiles("C:/path_example/example", "*.png"); //.png can be changed to match any other desired extentions string randomFilePath= files[Random.Range(0,files.Length)]; //e... Add solution -
-
Other 2022-01-30 11:55:32
unity random array element
using UnityEngine; using System.Collections; public class GameController : MonoBehaviour { public GameObject Enemy; public GameObject Player; public float sd = 5f; public float dia = 0.005f; public float[] yValues = new float[] {-3.5... Add solution -
C# 2021-11-22 12:01:14
unity spawning enemies in screen corners
/*Warning! Not 100% efficient answer!*//*Warning! Not 100% efficient answer!*/ private void spawnEnemy(GameObject prefab) { Camera mainCamera = Camera.main; int direction = Random.Range(0, 4); GameObject instantiated = null; ... Add solution -
C# 2021-11-22 12:00:59
unity spawning enemies in screen corners
/*Warning! Not 100% efficient answer!*//*Warning! Not 100% efficient answer!*/ private void spawnEnemy(GameObject prefab) { Camera mainCamera = Camera.main; int direction = Random.Range(0, 4); GameObject instantiated = null; ... Add solution
Best helpers
Ranking is empty