How to get prefab's creation time and date?
I'm implementing a custom editor which shows a list of prefabs in the project. I would like to retrieve the time and date of the prefab's creation to sort the list by newest or oldest.
Answer by komodor · Nov 29, 2016 at 05:46 PM
get path of the prefab file https://docs.unity3d.com/ScriptReference/AssetDatabase.GetAssetPath.html
get creation date of the file https://msdn.microsoft.com/en-us/library/system.io.file.getcreationtime(v=vs.110).aspx
Answer by turbanov · Dec 04, 2017 at 04:44 PM
The .meta file has as timeCreated field. You can extract it. It's in a UNIX timestamp format.
Your answer
Follow this Question
Related Questions
Prefabs.MergePrefabs on entering PlayMode takes almost 4 minutes 1 Answer
Wont instantiate game object 1 Answer
prefab time delay 1 Answer
Instantiate objects in for loop 0 Answers
Device time 1 Answer