< Summary

Information
Class: Hertzole.ScriptableValues.ScriptableObjectPool[T]
Assembly: Hertzole.ScriptableValues
File(s): ./Packages/se.hertzole.scriptable-values/Runtime/Pools/ScriptableObjectPool.cs
Tag: 52_28197466029
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CreateObject()0%110100%
DestroyObject(...)0%110100%

File(s)

./Packages/se.hertzole.scriptable-values/Runtime/Pools/ScriptableObjectPool.cs

#LineLine coverage
 1using UnityEngine;
 2
 3namespace Hertzole.ScriptableValues
 4{
 5    /// <summary>
 6    ///     A <see cref="ScriptableObject" /> that holds a pool of types inherited from <see cref="ScriptableObject" />.
 7    /// </summary>
 8    /// <typeparam name="T">The type of <see cref="ScriptableObject" />.</typeparam>
 9    public abstract class ScriptableObjectPool<T> : ScriptablePool<T> where T : ScriptableObject
 10    {
 11        protected override T CreateObject()
 16212        {
 13            // Create a new instance of the scriptable object.
 16214            return CreateInstance<T>();
 16215        }
 16
 17        protected override void DestroyObject(T item)
 16218        {
 19            // Destroy the scriptable object.
 16220            Destroy(item);
 16221        }
 22    }
 23}

Methods/Properties

CreateObject()
DestroyObject(T)