Working generic object pooling, pool monitor editor tool and batch component adder editor tool
This commit is contained in:
18
Assets/Scripts/Pooling/IPoolableWithReference.cs
Normal file
18
Assets/Scripts/Pooling/IPoolableWithReference.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Pooling
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for poolable objects that need to reference their parent pool.
|
||||
/// Implement this interface on objects that need to return themselves to their pool.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of pool component</typeparam>
|
||||
public interface IPoolableWithReference<T> : IPoolable where T : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the parent pool for this object
|
||||
/// </summary>
|
||||
/// <param name="pool">The pool this object belongs to</param>
|
||||
void SetPool(T pool);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user