// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors
// SPDX-License-Identifier: Apache-2.0
using System;
using UnityEngine;
namespace GLTFast
{
///
/// Instantiation settings
///
[Serializable]
public class InstantiationSettings
{
///
/// Can be used to exclude component instantiation based on type.
///
public ComponentType Mask
{
get => mask;
set => mask = value;
}
///
/// Instantiated objects will be assigned to this layer.
///
public int Layer
{
get => layer;
set => layer = value;
}
///
/// Corresponds to
/// When true, calculate the mesh bounds on every frame, even when
/// the mesh is not visible.
///
public bool SkinUpdateWhenOffscreen
{
get => skinUpdateWhenOffscreen;
set => skinUpdateWhenOffscreen = value;
}
///
/// Light intensity values are multiplied by this factor.
///
public float LightIntensityFactor
{
get => lightIntensityFactor;
set => lightIntensityFactor = value;
}
///
public SceneObjectCreation SceneObjectCreation
{
get => sceneObjectCreation;
set => sceneObjectCreation = value;
}
[SerializeField]
[Tooltip("Filter component instantiation based on type")]
ComponentType mask = ComponentType.All;
[SerializeField]
[Tooltip("Instantiated objects will be assigned to this layer")]
int layer;
[SerializeField]
[Tooltip("When checked, calculate the mesh bounds on every frame, even when the mesh is not visible")]
bool skinUpdateWhenOffscreen = true;
[SerializeField]
[Tooltip("Light intensity values are multiplied by this factor")]
float lightIntensityFactor = 1.0f;
[SerializeField]
[Tooltip("Scene object creation method. Determines whether or when a GameObject/Entity representing the scene should get created.")]
SceneObjectCreation sceneObjectCreation = SceneObjectCreation.WhenMultipleRootNodes;
}
}