Document Render Core And API

This commit is contained in:
copecone committed 2026-10-15 16:17:13 +09:00
1 parent 354c42fdd9
commit 8deb64fd4d
22 files changed
+1241 -27

No files matched your search

+12
View File
@@ -4,10 +4,22 @@ using UnityEngine;
namespace ADOFAIRenderer.Util
{
/// <summary>Particle system helpers.</summary>
internal static class ParticleUtil
{
/// <summary>
/// Renderer found for each particle system. Weak keys: an entry is dropped when its ParticleSystem object is collected.
/// Main thread.
/// </summary>
private static readonly ConditionalWeakTable<ParticleSystem, ParticleSystemRenderer> Cache = new();
/// <summary>
/// Returns the ParticleSystemRenderer that belongs to <paramref name="ps"/>. When a GameObject has several particle
/// systems and renderers, the renderer with the same component index as the particle system is used; otherwise the
/// first renderer of the GameObject. The result is cached per particle system. Main thread.
/// </summary>
/// <param name="ps">Particle system; null or destroyed returns null.</param>
/// <returns>The renderer, or null when the GameObject has none.</returns>
public static ParticleSystemRenderer? GetRenderer(this ParticleSystem ps)
{
if (!ps) return null;