Skip to content

Instantly share code, notes, and snippets.

@TheStoneBook
Created July 1, 2018 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheStoneBook/a1a1a52b57ab3d3118394dbefbde7ff4 to your computer and use it in GitHub Desktop.
Save TheStoneBook/a1a1a52b57ab3d3118394dbefbde7ff4 to your computer and use it in GitHub Desktop.
【Unity】指定アセットファイルのGUIDを取得する。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEditor;
public class GuidSample : MonoBehaviour {
void Start () {
string t = AssetDatabase.AssetPathToGUID ("Assets/FileName");
Debug.Log(t);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment