新插件
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// MicroSplat
|
||||
// Copyright (c) Jason Booth
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace JBooth.MicroSplat
|
||||
{
|
||||
public class MicroSplatKeywords : ScriptableObject
|
||||
{
|
||||
public List<string> keywords = new List<string>();
|
||||
|
||||
public bool IsKeywordEnabled(string k)
|
||||
{
|
||||
return (keywords.Contains(k));
|
||||
}
|
||||
|
||||
public void EnableKeyword(string k)
|
||||
{
|
||||
if (!IsKeywordEnabled(k))
|
||||
{
|
||||
keywords.Add(k);
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void DisableKeyword(string k)
|
||||
{
|
||||
if (IsKeywordEnabled(k))
|
||||
{
|
||||
keywords.Remove(k);
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user