Fix : 치요님 씬 세팅 추가 업데이트
This commit is contained in:
parent
967cce5b90
commit
ff23ad4bbb
@ -675,8 +675,8 @@ Material:
|
||||
- _ColorRenderStatesGroup: 0
|
||||
- _ColorRenderStatesGroupPreset: 0
|
||||
- _ControlledByNiloToonPerCharacterRenderController: 0
|
||||
- _Cull: 2
|
||||
- _CullNiloToonSelfShadowCaster: 1
|
||||
- _Cull: 0
|
||||
- _CullNiloToonSelfShadowCaster: 0
|
||||
- _CullOutline: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DebugFaceShadowGradientMap: 0
|
||||
@ -1058,7 +1058,7 @@ Material:
|
||||
- _ReceiveURPShadowMappingAmountForNonFace: 1
|
||||
- _RenderCharacter: 1
|
||||
- _RenderFaceGroup: 0
|
||||
- _RenderFacePreset: 0
|
||||
- _RenderFacePreset: 2
|
||||
- _RenderOutline: 1
|
||||
- _RenderScreenSpaceOutline: 0
|
||||
- _RenderScreenSpaceOutlineV2: 0
|
||||
|
||||
BIN
Assets/ResourcesData/Project/260605_치요님방송/260605_치요님방송_학교옥상.unity
(Stored with Git LFS)
BIN
Assets/ResourcesData/Project/260605_치요님방송/260605_치요님방송_학교옥상.unity
(Stored with Git LFS)
Binary file not shown.
@ -336,6 +336,19 @@ namespace Streamingle
|
||||
Deactivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Immediately despawn this object, skipping the flight, the post-arrival
|
||||
/// wait and the shrink-out animation. Called by the launcher's ClearAll to
|
||||
/// reset everything at once (e.g. to clear a donation-burst backlog).
|
||||
/// Pooled objects are deactivated; non-pooled ones are destroyed.
|
||||
/// </summary>
|
||||
public void ForceReset()
|
||||
{
|
||||
// Deactivate() already cancels invokes/coroutines and restores scale,
|
||||
// and routes to pool-deactivate vs destroy based on the launcher.
|
||||
Deactivate();
|
||||
}
|
||||
|
||||
private void Deactivate()
|
||||
{
|
||||
CancelInvoke();
|
||||
|
||||
@ -59,6 +59,10 @@ namespace Streamingle
|
||||
private GameObject[][] objectPool;
|
||||
private int[] poolIndices;
|
||||
|
||||
// Objects spawned directly (when pooling is off) so ClearAll can find them.
|
||||
private readonly System.Collections.Generic.List<GameObject> activeNonPooled =
|
||||
new System.Collections.Generic.List<GameObject>();
|
||||
|
||||
// Auto-created collider
|
||||
private SphereCollider createdTargetCollider;
|
||||
private Rigidbody createdTargetRigidbody;
|
||||
@ -239,6 +243,67 @@ namespace Streamingle
|
||||
ThrowObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Immediately reset only the currently-spawned (active) objects.
|
||||
/// Pooled instances are deactivated back into the pool (the pre-allocated
|
||||
/// reserve is left untouched); non-pooled instances are destroyed.
|
||||
/// Also cancels any pending ThrowMultiple delays so the backlog doesn't
|
||||
/// re-spawn right after clearing. Use this to relieve a donation-burst
|
||||
/// pile-up that causes frame drops. Safe to call at any time.
|
||||
/// </summary>
|
||||
[ContextMenu("Reset: Clear All Thrown Objects")]
|
||||
public void ClearAll()
|
||||
{
|
||||
// Cancel any queued ThrowMultiple delays still waiting to fire,
|
||||
// otherwise the pending throws would immediately repopulate the scene.
|
||||
StopAllCoroutines();
|
||||
ClearActiveObjects();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset only the objects currently out in the scene, leaving any pending
|
||||
/// ThrowMultiple delays running. Useful when you want to clear what's
|
||||
/// visible but let already-queued throws continue.
|
||||
/// </summary>
|
||||
public void ClearActiveObjects()
|
||||
{
|
||||
int cleared = 0;
|
||||
|
||||
// Pooled objects: deactivate every active instance back into the pool.
|
||||
// Inactive reserve objects are skipped, so the pool stays intact.
|
||||
if (objectPool != null)
|
||||
{
|
||||
foreach (var pool in objectPool)
|
||||
{
|
||||
if (pool == null) continue;
|
||||
foreach (var obj in pool)
|
||||
{
|
||||
if (obj == null || !obj.activeInHierarchy) continue;
|
||||
|
||||
var throwable = obj.GetComponent<ThrowableObject>();
|
||||
if (throwable != null) throwable.ForceReset();
|
||||
else obj.SetActive(false);
|
||||
cleared++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Non-pooled objects we instantiated directly (ForceReset destroys them).
|
||||
for (int i = activeNonPooled.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var obj = activeNonPooled[i];
|
||||
if (obj == null) continue;
|
||||
|
||||
var throwable = obj.GetComponent<ThrowableObject>();
|
||||
if (throwable != null) throwable.ForceReset();
|
||||
else Destroy(obj);
|
||||
cleared++;
|
||||
}
|
||||
activeNonPooled.Clear();
|
||||
|
||||
UnityEngine.Debug.Log($"[ThrowableObjectLauncher] Cleared {cleared} active object(s)");
|
||||
}
|
||||
|
||||
private GameObject GetObject(int prefabIndex)
|
||||
{
|
||||
GameObject obj;
|
||||
@ -279,6 +344,8 @@ namespace Streamingle
|
||||
throwable = obj.AddComponent<ThrowableObject>();
|
||||
}
|
||||
throwable.launcher = this;
|
||||
// Track so ClearAll can reset directly-instantiated objects.
|
||||
activeNonPooled.Add(obj);
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user