Aetheria/Assets/Scripts/UnityHelpers.cs

11 lines
280 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UnityHelpers
{
public static T LoadAsset<T>(string path) where T : Object
{
return Resources.Load<T>(path.Substring("Assets/Resources/".Length).Split('.')[0]);
}
}