In my Assets folder I have a folder named Material where I stored all the needed materials, One of the materials in the Material folder is Night_Sky
, which I want at a certain moment of the game to replace the day_sky
and set Night_sky
as my default Skybox. I tried many codes all of them return null object, examples :
night = Resources.Load("Material", typeof(Material)) as Material;
or
night = Resources.Load("Material/Night_Sky.mat", typeof(Material)) as Material;
How can I load my Night_Sky
material, or if there is an easier way to switch my skybox to night_sky
thank you for sharing it