Added player character and step in/out of dialogue in scene 101

This commit is contained in:
2026-08-15 15:22:47 +02:00
parent a42f25d5fa
commit 38ba2b0eff
2019 changed files with 181227 additions and 265 deletions
@@ -0,0 +1,58 @@
using UnityEngine;
using UnityEngine.Serialization;
namespace UnityEngine.ProBuilder
{
/// <summary>
/// Provides some additional functionality to GameObjects, like managing visiblity and colliders.
/// </summary>
[DisallowMultipleComponent]
[AddComponentMenu("")]
[HelpURL(k_HelpUrl)]
sealed class Entity : MonoBehaviour
{
const string k_HelpUrl = "https://docs.unity3d.com/Packages/com.unity.probuilder@latest";
public EntityType entityType { get { return m_EntityType; } }
[SerializeField]
[HideInInspector]
[FormerlySerializedAs("_entityType")]
EntityType m_EntityType;
/// <summary>
/// Performs Entity specific initialization tasks (turn off renderer for nodraw faces, hide colliders, etc)
/// </summary>
public void Awake()
{
MeshRenderer mr = GetComponent<MeshRenderer>();
if (!mr) return;
switch (entityType)
{
case EntityType.Occluder:
break;
case EntityType.Detail:
break;
case EntityType.Trigger:
mr.enabled = false;
break;
case EntityType.Collider:
mr.enabled = false;
break;
}
}
/// <summary>
/// Set the entity type.
/// </summary>
/// <param name="t"></param>
public void SetEntity(EntityType t)
{
m_EntityType = t;
}
}
}