CheckerMaterialRelease Method |
CheckerMaterial will check if another request exists. If not - it will destroy checker material instance.
Namespace: HightlanderSolutions.MeshCheckerEditorExtension.Checker
public static void Release( Guid requestorId )
private Material CheckerMaterialInstance; public void Initialize() { // Generate requestor id Guid RequestorId = Guid.NewGuid(); // Get checker material instance CheckerMaterialInstance = CheckerMaterial.Get(RequestorId); } public void ProcessSomething() { // Apply material to something } public void Deinitialize() { // Release checker material CheckerMaterial.Release(RequestorId); }