유니티
- Поделиться этим обсуждением
- Скопировать ссылку
- Поделиться в X (Twitter)
luckyzenith-64
OP
유니티 안개효과 만드는법
luckyzenith-64
OP
코드로 끄고 키게 만들고 싶은데..
luckyzenith-64
OP
극단으로 줄이면서 극한으로 쉬운걸로원함..
luckyzenith-64
OP
강도 어게 설정함?
luckyzenith-64
OP
RenderSettings.fog = true;이거 밑에 1줄만 더써야한다면 무슨 코드씀?
luckyzenith-64
OP
별 차이를 모르겠는데...
using UnityEngine;
public class SaveID : MonoBehaviour
{
public string id;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
RenderSettings.fog = true;
RenderSettings.fogMode = FogMode.Linear;
}
}
luckyzenith-64
OP
RenderSettings.fog = true;
RenderSettings.fogMode = FogMode.Linear;
RenderSettings.fogEndDistance = 10f;
이걸 끄고 키는 함수 어게만듬?
luckyzenith-64
OP
public void Loding()
{
int index = PlayerPrefs.GetInt("objectcount", 1);
for (int i = 0; i < index; i++)
{
GameObject spawnObject = Resources.Load<GameObject>(PlayerPrefs.GetString("id"));
Vector3 p = new Vector3(PlayerPrefs.GetFloat("x"+i), PlayerPrefs.GetFloat("y" + i), PlayerPrefs.GetFloat("z" + i));
Vector3 s = new Vector3(PlayerPrefs.GetFloat("sx"+i), PlayerPrefs.GetFloat("sy" + i), PlayerPrefs.GetFloat("sz" + i));
Vector3 r = new Vector3(PlayerPrefs.GetFloat("rx"+i), PlayerPrefs.GetFloat("ry" + i), PlayerPrefs.GetFloat("rz" + i));
GameObject obj = Instantiate(spawnObject, p, Quaternion.identity);
obj.transform.localScale = s;
obj.transform.localRotation = r;
}
}
이거 왜 r이 안됨?