You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
682 B
C#
23 lines
682 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Super class for every Polybrush Assets implementing Reset() function
|
|
/// so that when you reset them from the inspector they don't loose their name
|
|
/// </summary>
|
|
public class PolyAsset : ScriptableObject
|
|
{
|
|
/// <summary>
|
|
/// Reset() function so that when you reset Polybrush Assets
|
|
/// from the inspector they don't loose their name
|
|
/// </summary>
|
|
protected virtual void Reset()
|
|
{
|
|
string path = AssetDatabase.GetAssetPath(this.GetInstanceID());
|
|
this.name = Path.GetFileNameWithoutExtension(path);
|
|
}
|
|
}
|