{"id":80,"date":"2021-10-24T07:53:47","date_gmt":"2021-10-24T07:53:47","guid":{"rendered":"https:\/\/docs.sisus.co\/inity\/?p=80"},"modified":"2025-07-14T19:36:56","modified_gmt":"2025-07-14T19:36:56","slug":"find","status":"publish","type":"post","link":"https:\/\/docs.sisus.co\/init-args\/reference\/find\/","title":{"rendered":"Find API"},"content":{"rendered":"<p>The Find class is a utility class that helps in locating instances of objects from loaded scenes as well as assets from the project.<\/p>\n<p>It has been designed from the ground up to work well with interface types, making it easier to decouple your code from specific concrete classes.<\/p>\n<p>All methods in the Find class have the following features:<\/p>\n<ul>\n<li>Support for finding instances by interface type.<\/li>\n<li>Support for finding instances by the <a href=\"#Wrapper&lt;T&gt;|outline\">wrapped<\/a> object type.<\/li>\n<li>Support for finding instances from inactive GameObjects.<\/li>\n<li>Support for TryGet style queries, where the method returns true if results were found or false if not.<\/li>\n<\/ul>\n<p>The Find class includes the following static methods:<\/p>\n<ul>\n<li><b>Find.<\/b><b>Any<\/b> \u2013 Finds first instance of the provided type from active scenes.<\/li>\n<li><b>Find.<\/b><b>All<\/b> \u2013 Finds all instances of the provided type from active scense.<\/li>\n<li><b>Find.<\/b><b>InParents<\/b> \u2013 Finds object by type in GameObject and its parents.<\/li>\n<li><b>Find.<\/b><b>AllInParents<\/b> \u2013 Finds all objects by type in GameObject and its parents.<\/li>\n<li><b>Find.<\/b><b>In<\/b><b>Children<\/b> \u2013 Finds object by type in GameObject and its children.<\/li>\n<li><b>Find.<\/b><b>AllIn<\/b><b>Children<\/b> \u2013 Finds all objects by type in GameObject and its children.<\/li>\n<li><b>Find.<\/b><b>WithTag<\/b> \u2013 Finds object with tag.<\/li>\n<li><b>Find.<\/b><b>GameObjectWith<\/b> \u2013 Finds first GameObject from active scenes that has an object of the given type attached to it.<\/li>\n<li><b>Find.<\/b><b>GameObjec<\/b><b>tOf<\/b> \u2013 Finds GameObject from active scenes that has the provided object attached to it.<\/li>\n<li><b>Find.WrappedObject<\/b> \u2013 Finds plain old class object of the provided type wrapped by a <a href=\"#Wrapper&lt;T&gt;|outline\">wrapper<\/a> component from active scenes.<\/li>\n<li><b>Find.AllWrappedObjects<\/b> \u2013 Finds all plain old class objects of the provided type wrapped by <a href=\"#Wrapper&lt;T&gt;|outline\">wrapper<\/a> components from active scenes.<\/li>\n<li><b>Find.WrapperOf<\/b> \u2013 Finds <a href=\"#Wrapper&lt;T&gt;|outline\">wrapper<\/a> component of the provided object.<\/li>\n<li><b>Find.Wrapper<\/b> \u2013 Find first <a href=\"#Wrapper&lt;T&gt;|outline\">wrapper<\/a> component from active scense that wraps a plain old class object of the provided type.<\/li>\n<li><b>Find.AllWrappers<\/b> \u2013 Find all <a href=\"#Wrapper&lt;T&gt;|outline\">wrapper<\/a> components from active scense that wrap a plain old class object of the provided type.<\/li>\n<li><b>Find.In<\/b> \u2013 <span lang=\"en-US\">Finds first object of the provided type that is attached to a specific GameObject.<\/span><\/li>\n<li><b>Find.AllIn<\/b> \u2013 <span lang=\"en-US\">Finds all objects of the provided type that are attached to a specific GameObject.<\/span><\/li>\n<li><span lang=\"en-US\"><b>Find.<\/b><\/span><span lang=\"en-US\"><b>Addressable<\/b><\/span><span lang=\"en-US\"> \u2013 <\/span><span lang=\"en-US\">Finds<\/span><span lang=\"en-US\"> addressable <\/span><span lang=\"en-US\">asset<\/span><span lang=\"en-US\"> synchronously. <\/span><span lang=\"en-US\">Has<\/span><span lang=\"en-US\"> both runtime and edit mode support.<\/span><\/li>\n<li><span lang=\"en-US\"><b>Find.<\/b><\/span><span lang=\"en-US\"><b>Resource<\/b><\/span><span lang=\"en-US\"> \u2013 <\/span><span lang=\"en-US\">Finds object from the provided resources path<\/span><span lang=\"en-US\">.<\/span><\/li>\n<li><span lang=\"en-US\"><b>Find.<\/b><\/span><span lang=\"en-US\"><b>Asset<\/b><\/span><span lang=\"en-US\"> \u2013 <\/span><span lang=\"en-US\">Editor only method that finds asset of the provided type from the asset database.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The Find class is a utility class that helps in locating instances of objects from loaded scenes as well as assets from the project. It has been designed from the ground up to work well with interface types, making it easier to decouple your code from specific concrete classes. All methods in the Find class ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/docs.sisus.co\/init-args\/reference\/find\/\" title=\"read more\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":8,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":834,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/posts\/80\/revisions\/834"}],"wp:attachment":[{"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.sisus.co\/init-args\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}