Skip to content
Discussion options

You must be logged in to vote

Since I assume this is a PC game, and not in a bundle, you will need to load the class database:

am.LoadClassPackage("classdata.tpk");
am.LoadClassDatabaseFromPackage(inst.file.typeTree.unityVersion);

And the reason for that foreach loop, was I originally tried searching for "PlayerSettings" with GetAssetInfo("RocketShip"); but it couldn't find it.

AssetsView is a bit misleading here. The actual asset isn't named, so AssetsView defaults to the same name as the type. GetAssetInfo only looks for the m_Name field if it exists, so it won't help you. GetAssetsOfType is the right way, although it returns an array so you could just do [0] on it instead of a foreach loop.

Also, PlayerSettings i…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nesrak1
Comment options

@MarshMello0
Comment options

Answer selected by MarshMello0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants