how to find go by guid

Started by k0fe · one year ago · 7 replies · 512 views

#1
k0fe
Member
JoinedAug 2023 Posts80 Score318
how would you approach at finding gameobject only having its guid?
#2
Zontax
Member
JoinedMay 2023 Posts84 Score8,642
Scene.Directory.FindByGuid() ?
#3
k0fe
Member
JoinedAug 2023 Posts80 Score318
Can I search by GUID in the scene for example? As a developer? 

I went through manually searching through scene using text editor 
#4
Lorenz
Facepunch
JoinedAug 2021 Posts26 Score2,160
Have you tried what Zontax said? that should work 

Scene.Directory.FindByGuid("c14e7405-86e3-4e4a-afb6-0c6ccd765888");
#5
k0fe
Member
JoinedAug 2023 Posts80 Score318
Yeah, my point was if it's possible to do so without writing code? In some cases you just find a gameobject with specific components or even guid (this one should not happen really)
Was curious if there such functional in the search bar or any other way

FindByGuid is a viable option when we work with code, for sure. Thanks for going an extra mile and even putting the right GUID in the code snippet, appreciate the effort
#6
Lorenz
Facepunch
JoinedAug 2021 Posts26 Score2,160
Ahh I see. Well we could definitely add that ability to the scene search bar.
Could you create an issue on github for that?
edited one year ago#7
k0fe
Member
JoinedAug 2023 Posts80 Score318
edited:
You can search by guid by typing id: before your guid in the search bar. E.g id:86378aba-add8-4a01-ae87-7b9c0688f038 .

- badandbest
#8
badandbest
Member
JoinedJul 2022 Posts21 Score575
You can also search by components with t:. E.g t:SkinnedModelRenderer

And by tags with tag:. E.g tag:trigger.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.