assetsscriptsexecuteevents.cs(236,24): error cs0122: 'objectpool<t>' is inaccessible due to its protection level 1

assets\scripts\executeevents.cs(236,24): error cs0122: ‘objectpool‘ is inaccessible due to its protection level

public static ObjectPool> s_HandlerListPool = new ObjectPool>(null, l => l.Clear());

Here is what the above code is Doing:
1. Create a new ObjectPool>.
2. The first parameter is a Func>, which is a function that returns a new List.
3. The second parameter is an Action>, which is a function that resets the List.
4. The ObjectPool> is assigned to a static variable, so that it can be accessed from anywhere.

Similar Posts