Move and consolidate many third-party plugin files and metadata from various locations (notably Assets/Third Parties/Plugins 1 and scattered Opsive/Photon folders) into a unified Assets/Plugins directory. Includes DOTween, PrimeTween, Native/BackroomsNoise, Sirenix/Odin Inspector, and Opsive UltimateCharacterController/shared libs, plus updates to several .meta files and removal of obsolete installer/legacy files. This standardizes plugin layout and cleans up duplicate/obsolete assets.
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
/// ---------------------------------------------
|
|
/// Ultimate Character Controller
|
|
/// Copyright (c) Opsive. All Rights Reserved.
|
|
/// https://www.opsive.com
|
|
/// ---------------------------------------------
|
|
|
|
namespace Opsive.UltimateCharacterController.Demo
|
|
{
|
|
using Opsive.UltimateCharacterController.Game;
|
|
using Opsive.UltimateCharacterController.Objects.CharacterAssist;
|
|
using Opsive.UltimateCharacterController.Utility;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Resets the specified interactable objects when the character leaves the room.
|
|
/// </summary>
|
|
public class InteractRoomReset : MonoBehaviour
|
|
{
|
|
[Tooltip("A list of objects that should be reset when the character leaves the room.")]
|
|
public GameObject[] m_InteractObjects;
|
|
|
|
/// <summary>
|
|
/// An object has exited the trigger.
|
|
/// </summary>
|
|
/// <param name="other">The collider that exited the trigger.</param>
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
// A main character collider is required.
|
|
if (!MathUtility.InLayerMask(other.gameObject.layer, 1 << LayerManager.Character)) {
|
|
return;
|
|
}
|
|
|
|
ResetInteractObjects();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Resets the interact room objects.
|
|
/// </summary>
|
|
private void ResetInteractObjects()
|
|
{
|
|
for (int i = 0; i < m_InteractObjects.Length; ++i) {
|
|
var animatedInteractables = m_InteractObjects[i].GetComponents<AnimatedInteractable>();
|
|
for (int j = 0; j < animatedInteractables.Length; ++j) {
|
|
animatedInteractables[j].ResetInteract();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |