Skip to content

Instantly share code, notes, and snippets.

@michael-sacco
Created June 12, 2023 14:19
Show Gist options
  • Select an option

  • Save michael-sacco/ea9c7e4ddf0a9b4903296c368768258e to your computer and use it in GitHub Desktop.

Select an option

Save michael-sacco/ea9c7e4ddf0a9b4903296c368768258e to your computer and use it in GitHub Desktop.
Demo of Altos API
// See manual: https://www.occasoftware.com/manual/altos
using UnityEngine;
using OccaSoftware.Altos.Runtime;
[ExecuteAlways]
public class DemoAltosAPI : MonoBehaviour
{
[SerializeField]
private SkyDefinition skyDefinition;
[SerializeField]
private CloudDefinition cloudDefinition;
[SerializeField, Range(0f, 3f)]
private float overrideExposure = 3f;
[SerializeField, Range(0, 2f)]
private float overrideCloudHeight = 2f;
// Update is called once per frame
void Update()
{
skyDefinition.environmentLightingExposure = 3f;
cloudDefinition.cloudLayerHeight = overrideCloudHeight;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment