c# - How to know image is used in which prefab -


how know image used in prefabs? in project (modified project on ray wenderlich) below, have image named cat.png. use in myprefab.prefab. suppose i'm not project creator, how can find out prefab each image came from?

enter image description here

this has been answered before. can find using code. put code below in start() function , click play stop. show prefab gameobject/cat picture belongs to.

   void start()    {         gameobject prefab = gameobject.find("cat");         object gameobject2 = unityeditor.prefabutility.getprefabparent(prefab);         string prefabpath = unityeditor.assetdatabase.getassetpath(gameobject2);         debug.log("path: " + prefabpath);     } 

or without code:

select object/cat hierarchy on inspector on right, click select , prefab name displayed , selected in project tab.

enter image description here


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -