Topic on Talk:Modding Tutorials/ThingComp
Jump to navigation
Jump to search
This is a permanent link to the first version of this post.
You can view later versions on the post history page.
https://rimworldwiki.com/wiki/Modding_Tutorials/ThingComp#Accessing_your_CompProperties
Still there, just simplified.
The code on the previous example had some unsafe casting that would've led to runtime exceptions. Not all Things are ThingsWithComps, and even GetComp<> can return null. --Mehni (talk)