mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 00:08:51 -05:00
14 lines
362 B
C#
14 lines
362 B
C#
using System.Linq;
|
|
using TriInspector;
|
|
using UnityEngine;
|
|
|
|
public class Validators_RequiredSample : ScriptableObject
|
|
{
|
|
[Required(FixAction = nameof(FixMaterial), FixActionName = "Find in Resources")]
|
|
public Material material;
|
|
|
|
private void FixMaterial()
|
|
{
|
|
material = Resources.FindObjectsOfTypeAll<Material>().FirstOrDefault();
|
|
}
|
|
} |