0

I'm not sure if the unity GUID is a generic GUID which is unique on different computers.

I'm not good at English. I means that if I import some files to unity on different computers, Is it possible to get the same Unity GUID in these files?

I don't use the C#'s GUID. I get it(Unity's GUID) from this function AssetDatabase.AssetPathToGUID(" My Asset Path ")

I import assets by this:

File.Copy(original_asset_path, target_path);
AssetDatabase.ImportAsset(local_target_path);
AssetDatabase.Refresh();

(I also wonder if there is anything wrong with this method to import asset by code)

yymmyb
  • 84
  • 6
  • *Which* GUID are you referring to specifically? Are you talking about GUIDs/UUIDs or something else? – Dai Apr 21 '20 at 02:43
  • this [GUIDs](https://stackoverflow.com/questions/39771/is-a-guid-unique-100-of-the-time#). – yymmyb Apr 21 '20 at 02:50
  • I want to use the GUID as the key of the resource database on the server. – yymmyb Apr 21 '20 at 02:52
  • Okay, but what does that have to do with the Unity3D game engine? You're talking about a database... – Dai Apr 21 '20 at 03:39
  • Depends ... how exactly are you importing the files into Unity? – derHugo Apr 21 '20 at 07:25
  • If you will use C#'s [GUID](https://learn.microsoft.com/en-us/dotnet/api/system.guid.newguid?view=netframework-4.8), it's going to be unique and you can count on it. – Ron Apr 21 '20 at 08:21

0 Answers0