UnityClassRegistration.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. extern "C" void RegisterStaticallyLinkedModulesGranular()
  2. {
  3. void RegisterModule_SharedInternals();
  4. RegisterModule_SharedInternals();
  5. void RegisterModule_Core();
  6. RegisterModule_Core();
  7. void RegisterModule_Animation();
  8. RegisterModule_Animation();
  9. void RegisterModule_AssetBundle();
  10. RegisterModule_AssetBundle();
  11. void RegisterModule_Audio();
  12. RegisterModule_Audio();
  13. void RegisterModule_GameCenter();
  14. RegisterModule_GameCenter();
  15. void RegisterModule_HotReload();
  16. RegisterModule_HotReload();
  17. void RegisterModule_ImageConversion();
  18. RegisterModule_ImageConversion();
  19. void RegisterModule_InputLegacy();
  20. RegisterModule_InputLegacy();
  21. void RegisterModule_IMGUI();
  22. RegisterModule_IMGUI();
  23. void RegisterModule_JSONSerialize();
  24. RegisterModule_JSONSerialize();
  25. void RegisterModule_ParticleSystem();
  26. RegisterModule_ParticleSystem();
  27. void RegisterModule_Physics();
  28. RegisterModule_Physics();
  29. void RegisterModule_Physics2D();
  30. RegisterModule_Physics2D();
  31. void RegisterModule_TextRendering();
  32. RegisterModule_TextRendering();
  33. void RegisterModule_TextCore();
  34. RegisterModule_TextCore();
  35. void RegisterModule_TLS();
  36. RegisterModule_TLS();
  37. void RegisterModule_UI();
  38. RegisterModule_UI();
  39. void RegisterModule_UnityWebRequest();
  40. RegisterModule_UnityWebRequest();
  41. void RegisterModule_UnityWebRequestTexture();
  42. RegisterModule_UnityWebRequestTexture();
  43. }
  44. template <typename T> void RegisterUnityClass(const char*);
  45. template <typename T> void RegisterStrippedType(int, const char*, const char*);
  46. void InvokeRegisterStaticallyLinkedModuleClasses()
  47. {
  48. // Do nothing (we're in stripping mode)
  49. }
  50. namespace ObjectProduceTestTypes { class Derived; }
  51. namespace ObjectProduceTestTypes { class SubDerived; }
  52. class EditorExtension; template <> void RegisterUnityClass<EditorExtension>(const char*);
  53. namespace Unity { class Component; } template <> void RegisterUnityClass<Unity::Component>(const char*);
  54. class Behaviour; template <> void RegisterUnityClass<Behaviour>(const char*);
  55. class Animation;
  56. class Animator; template <> void RegisterUnityClass<Animator>(const char*);
  57. class AudioBehaviour; template <> void RegisterUnityClass<AudioBehaviour>(const char*);
  58. class AudioListener; template <> void RegisterUnityClass<AudioListener>(const char*);
  59. class AudioSource; template <> void RegisterUnityClass<AudioSource>(const char*);
  60. class AudioFilter;
  61. class AudioChorusFilter;
  62. class AudioDistortionFilter;
  63. class AudioEchoFilter;
  64. class AudioHighPassFilter;
  65. class AudioLowPassFilter;
  66. class AudioReverbFilter;
  67. class AudioReverbZone;
  68. class Camera; template <> void RegisterUnityClass<Camera>(const char*);
  69. namespace UI { class Canvas; } template <> void RegisterUnityClass<UI::Canvas>(const char*);
  70. namespace UI { class CanvasGroup; } template <> void RegisterUnityClass<UI::CanvasGroup>(const char*);
  71. namespace Unity { class Cloth; }
  72. class Collider2D; template <> void RegisterUnityClass<Collider2D>(const char*);
  73. class BoxCollider2D; template <> void RegisterUnityClass<BoxCollider2D>(const char*);
  74. class CapsuleCollider2D;
  75. class CircleCollider2D; template <> void RegisterUnityClass<CircleCollider2D>(const char*);
  76. class CompositeCollider2D;
  77. class EdgeCollider2D;
  78. class PolygonCollider2D;
  79. class TilemapCollider2D;
  80. class ConstantForce;
  81. class Effector2D;
  82. class AreaEffector2D;
  83. class BuoyancyEffector2D;
  84. class PlatformEffector2D;
  85. class PointEffector2D;
  86. class SurfaceEffector2D;
  87. class FlareLayer; template <> void RegisterUnityClass<FlareLayer>(const char*);
  88. class GridLayout;
  89. class Grid;
  90. class Tilemap;
  91. class Halo;
  92. class HaloLayer;
  93. class IConstraint;
  94. class AimConstraint;
  95. class LookAtConstraint;
  96. class ParentConstraint;
  97. class PositionConstraint;
  98. class RotationConstraint;
  99. class ScaleConstraint;
  100. class Joint2D;
  101. class AnchoredJoint2D;
  102. class DistanceJoint2D;
  103. class FixedJoint2D;
  104. class FrictionJoint2D;
  105. class HingeJoint2D;
  106. class SliderJoint2D;
  107. class SpringJoint2D;
  108. class WheelJoint2D;
  109. class RelativeJoint2D;
  110. class TargetJoint2D;
  111. class LensFlare;
  112. class Light; template <> void RegisterUnityClass<Light>(const char*);
  113. class LightProbeGroup;
  114. class LightProbeProxyVolume;
  115. class MonoBehaviour; template <> void RegisterUnityClass<MonoBehaviour>(const char*);
  116. class NavMeshAgent;
  117. class NavMeshObstacle;
  118. class OffMeshLink;
  119. class ParticleSystemForceField;
  120. class PhysicsUpdateBehaviour2D;
  121. class ConstantForce2D;
  122. class PlayableDirector;
  123. class Projector;
  124. class ReflectionProbe; template <> void RegisterUnityClass<ReflectionProbe>(const char*);
  125. class Skybox;
  126. class SortingGroup;
  127. class StreamingController;
  128. class Terrain;
  129. class VideoPlayer;
  130. class VisualEffect;
  131. class WindZone;
  132. namespace UI { class CanvasRenderer; } template <> void RegisterUnityClass<UI::CanvasRenderer>(const char*);
  133. class Collider; template <> void RegisterUnityClass<Collider>(const char*);
  134. class BoxCollider; template <> void RegisterUnityClass<BoxCollider>(const char*);
  135. class CapsuleCollider; template <> void RegisterUnityClass<CapsuleCollider>(const char*);
  136. class CharacterController;
  137. class MeshCollider; template <> void RegisterUnityClass<MeshCollider>(const char*);
  138. class SphereCollider; template <> void RegisterUnityClass<SphereCollider>(const char*);
  139. class TerrainCollider;
  140. class WheelCollider;
  141. class FakeComponent;
  142. namespace Unity { class Joint; }
  143. namespace Unity { class CharacterJoint; }
  144. namespace Unity { class ConfigurableJoint; }
  145. namespace Unity { class FixedJoint; }
  146. namespace Unity { class HingeJoint; }
  147. namespace Unity { class SpringJoint; }
  148. class LODGroup;
  149. class MeshFilter; template <> void RegisterUnityClass<MeshFilter>(const char*);
  150. class OcclusionArea; template <> void RegisterUnityClass<OcclusionArea>(const char*);
  151. class OcclusionPortal;
  152. class ParticleSystem; template <> void RegisterUnityClass<ParticleSystem>(const char*);
  153. class Renderer; template <> void RegisterUnityClass<Renderer>(const char*);
  154. class BillboardRenderer;
  155. class LineRenderer;
  156. class RendererFake;
  157. class MeshRenderer; template <> void RegisterUnityClass<MeshRenderer>(const char*);
  158. class ParticleSystemRenderer; template <> void RegisterUnityClass<ParticleSystemRenderer>(const char*);
  159. class SkinnedMeshRenderer; template <> void RegisterUnityClass<SkinnedMeshRenderer>(const char*);
  160. class SpriteMask;
  161. class SpriteRenderer; template <> void RegisterUnityClass<SpriteRenderer>(const char*);
  162. class SpriteShapeRenderer;
  163. class TilemapRenderer;
  164. class TrailRenderer;
  165. class VFXRenderer;
  166. class Rigidbody; template <> void RegisterUnityClass<Rigidbody>(const char*);
  167. class Rigidbody2D; template <> void RegisterUnityClass<Rigidbody2D>(const char*);
  168. namespace TextRenderingPrivate { class TextMesh; }
  169. class Transform; template <> void RegisterUnityClass<Transform>(const char*);
  170. namespace UI { class RectTransform; } template <> void RegisterUnityClass<UI::RectTransform>(const char*);
  171. class Tree;
  172. class WorldAnchor;
  173. class GameObject; template <> void RegisterUnityClass<GameObject>(const char*);
  174. class NamedObject; template <> void RegisterUnityClass<NamedObject>(const char*);
  175. class AssetBundle; template <> void RegisterUnityClass<AssetBundle>(const char*);
  176. class AssetBundleManifest;
  177. class AudioMixer;
  178. class AudioMixerController;
  179. class AudioMixerGroup;
  180. class AudioMixerGroupController;
  181. class AudioMixerSnapshot;
  182. class AudioMixerSnapshotController;
  183. class Avatar; template <> void RegisterUnityClass<Avatar>(const char*);
  184. class AvatarMask;
  185. class BillboardAsset;
  186. class ComputeShader; template <> void RegisterUnityClass<ComputeShader>(const char*);
  187. class Flare;
  188. namespace TextRendering { class Font; } template <> void RegisterUnityClass<TextRendering::Font>(const char*);
  189. class LightProbes;
  190. class LocalizationAsset;
  191. class Material; template <> void RegisterUnityClass<Material>(const char*);
  192. class ProceduralMaterial;
  193. class Mesh; template <> void RegisterUnityClass<Mesh>(const char*);
  194. class Motion; template <> void RegisterUnityClass<Motion>(const char*);
  195. class AnimationClip; template <> void RegisterUnityClass<AnimationClip>(const char*);
  196. class NavMeshData;
  197. class OcclusionCullingData;
  198. class PhysicMaterial; template <> void RegisterUnityClass<PhysicMaterial>(const char*);
  199. class PhysicsMaterial2D;
  200. class PreloadData; template <> void RegisterUnityClass<PreloadData>(const char*);
  201. class RayTracingShader;
  202. class RuntimeAnimatorController; template <> void RegisterUnityClass<RuntimeAnimatorController>(const char*);
  203. class AnimatorController; template <> void RegisterUnityClass<AnimatorController>(const char*);
  204. class AnimatorOverrideController; template <> void RegisterUnityClass<AnimatorOverrideController>(const char*);
  205. class SampleClip; template <> void RegisterUnityClass<SampleClip>(const char*);
  206. class AudioClip; template <> void RegisterUnityClass<AudioClip>(const char*);
  207. class Shader; template <> void RegisterUnityClass<Shader>(const char*);
  208. class ShaderVariantCollection;
  209. class SpeedTreeWindAsset;
  210. class Sprite; template <> void RegisterUnityClass<Sprite>(const char*);
  211. class SpriteAtlas; template <> void RegisterUnityClass<SpriteAtlas>(const char*);
  212. class SubstanceArchive;
  213. class TerrainData;
  214. class TerrainLayer;
  215. class TextAsset; template <> void RegisterUnityClass<TextAsset>(const char*);
  216. class CGProgram;
  217. class MonoScript; template <> void RegisterUnityClass<MonoScript>(const char*);
  218. class Texture; template <> void RegisterUnityClass<Texture>(const char*);
  219. class BaseVideoTexture;
  220. class WebCamTexture;
  221. class CubemapArray; template <> void RegisterUnityClass<CubemapArray>(const char*);
  222. class LowerResBlitTexture; template <> void RegisterUnityClass<LowerResBlitTexture>(const char*);
  223. class MovieTexture;
  224. class ProceduralTexture;
  225. class RenderTexture; template <> void RegisterUnityClass<RenderTexture>(const char*);
  226. class CustomRenderTexture;
  227. class SparseTexture;
  228. class Texture2D; template <> void RegisterUnityClass<Texture2D>(const char*);
  229. class Cubemap; template <> void RegisterUnityClass<Cubemap>(const char*);
  230. class Texture2DArray; template <> void RegisterUnityClass<Texture2DArray>(const char*);
  231. class Texture3D; template <> void RegisterUnityClass<Texture3D>(const char*);
  232. class VideoClip;
  233. class VisualEffectObject;
  234. class VisualEffectAsset;
  235. class VisualEffectSubgraph;
  236. class EmptyObject;
  237. class GameManager; template <> void RegisterUnityClass<GameManager>(const char*);
  238. class GlobalGameManager; template <> void RegisterUnityClass<GlobalGameManager>(const char*);
  239. class AudioManager; template <> void RegisterUnityClass<AudioManager>(const char*);
  240. class BuildSettings; template <> void RegisterUnityClass<BuildSettings>(const char*);
  241. class DelayedCallManager; template <> void RegisterUnityClass<DelayedCallManager>(const char*);
  242. class GraphicsSettings; template <> void RegisterUnityClass<GraphicsSettings>(const char*);
  243. class InputManager; template <> void RegisterUnityClass<InputManager>(const char*);
  244. class MonoManager; template <> void RegisterUnityClass<MonoManager>(const char*);
  245. class NavMeshProjectSettings;
  246. class Physics2DSettings; template <> void RegisterUnityClass<Physics2DSettings>(const char*);
  247. class PhysicsManager; template <> void RegisterUnityClass<PhysicsManager>(const char*);
  248. class PlayerSettings; template <> void RegisterUnityClass<PlayerSettings>(const char*);
  249. class QualitySettings; template <> void RegisterUnityClass<QualitySettings>(const char*);
  250. class ResourceManager; template <> void RegisterUnityClass<ResourceManager>(const char*);
  251. class RuntimeInitializeOnLoadManager; template <> void RegisterUnityClass<RuntimeInitializeOnLoadManager>(const char*);
  252. class ScriptMapper; template <> void RegisterUnityClass<ScriptMapper>(const char*);
  253. class StreamingManager;
  254. class TagManager; template <> void RegisterUnityClass<TagManager>(const char*);
  255. class TimeManager; template <> void RegisterUnityClass<TimeManager>(const char*);
  256. class UnityConnectSettings;
  257. class VFXManager;
  258. class LevelGameManager; template <> void RegisterUnityClass<LevelGameManager>(const char*);
  259. class LightmapSettings; template <> void RegisterUnityClass<LightmapSettings>(const char*);
  260. class NavMeshSettings;
  261. class OcclusionCullingSettings;
  262. class RenderSettings; template <> void RegisterUnityClass<RenderSettings>(const char*);
  263. class NativeObjectType;
  264. class PropertyModificationsTargetTestObject;
  265. class SerializableManagedHost;
  266. class SerializableManagedRefTestClass;
  267. namespace ObjectProduceTestTypes { class SiblingDerived; }
  268. class TestObjectVectorPairStringBool;
  269. class TestObjectWithSerializedAnimationCurve;
  270. class TestObjectWithSerializedArray;
  271. class TestObjectWithSerializedMapStringBool;
  272. class TestObjectWithSerializedMapStringNonAlignedStruct;
  273. class TestObjectWithSpecialLayoutOne;
  274. class TestObjectWithSpecialLayoutTwo;
  275. void RegisterAllClasses()
  276. {
  277. void RegisterBuiltinTypes();
  278. RegisterBuiltinTypes();
  279. //Total: 86 non stripped classes
  280. //0. AnimationClip
  281. RegisterUnityClass<AnimationClip>("Animation");
  282. //1. Animator
  283. RegisterUnityClass<Animator>("Animation");
  284. //2. AnimatorController
  285. RegisterUnityClass<AnimatorController>("Animation");
  286. //3. AnimatorOverrideController
  287. RegisterUnityClass<AnimatorOverrideController>("Animation");
  288. //4. Avatar
  289. RegisterUnityClass<Avatar>("Animation");
  290. //5. Motion
  291. RegisterUnityClass<Motion>("Animation");
  292. //6. RuntimeAnimatorController
  293. RegisterUnityClass<RuntimeAnimatorController>("Animation");
  294. //7. AssetBundle
  295. RegisterUnityClass<AssetBundle>("AssetBundle");
  296. //8. AudioBehaviour
  297. RegisterUnityClass<AudioBehaviour>("Audio");
  298. //9. AudioClip
  299. RegisterUnityClass<AudioClip>("Audio");
  300. //10. AudioListener
  301. RegisterUnityClass<AudioListener>("Audio");
  302. //11. AudioManager
  303. RegisterUnityClass<AudioManager>("Audio");
  304. //12. AudioSource
  305. RegisterUnityClass<AudioSource>("Audio");
  306. //13. SampleClip
  307. RegisterUnityClass<SampleClip>("Audio");
  308. //14. Behaviour
  309. RegisterUnityClass<Behaviour>("Core");
  310. //15. BuildSettings
  311. RegisterUnityClass<BuildSettings>("Core");
  312. //16. Camera
  313. RegisterUnityClass<Camera>("Core");
  314. //17. Unity::Component
  315. RegisterUnityClass<Unity::Component>("Core");
  316. //18. ComputeShader
  317. RegisterUnityClass<ComputeShader>("Core");
  318. //19. Cubemap
  319. RegisterUnityClass<Cubemap>("Core");
  320. //20. CubemapArray
  321. RegisterUnityClass<CubemapArray>("Core");
  322. //21. DelayedCallManager
  323. RegisterUnityClass<DelayedCallManager>("Core");
  324. //22. EditorExtension
  325. RegisterUnityClass<EditorExtension>("Core");
  326. //23. FlareLayer
  327. RegisterUnityClass<FlareLayer>("Core");
  328. //24. GameManager
  329. RegisterUnityClass<GameManager>("Core");
  330. //25. GameObject
  331. RegisterUnityClass<GameObject>("Core");
  332. //26. GlobalGameManager
  333. RegisterUnityClass<GlobalGameManager>("Core");
  334. //27. GraphicsSettings
  335. RegisterUnityClass<GraphicsSettings>("Core");
  336. //28. InputManager
  337. RegisterUnityClass<InputManager>("Core");
  338. //29. LevelGameManager
  339. RegisterUnityClass<LevelGameManager>("Core");
  340. //30. Light
  341. RegisterUnityClass<Light>("Core");
  342. //31. LightmapSettings
  343. RegisterUnityClass<LightmapSettings>("Core");
  344. //32. LowerResBlitTexture
  345. RegisterUnityClass<LowerResBlitTexture>("Core");
  346. //33. Material
  347. RegisterUnityClass<Material>("Core");
  348. //34. Mesh
  349. RegisterUnityClass<Mesh>("Core");
  350. //35. MeshFilter
  351. RegisterUnityClass<MeshFilter>("Core");
  352. //36. MeshRenderer
  353. RegisterUnityClass<MeshRenderer>("Core");
  354. //37. MonoBehaviour
  355. RegisterUnityClass<MonoBehaviour>("Core");
  356. //38. MonoManager
  357. RegisterUnityClass<MonoManager>("Core");
  358. //39. MonoScript
  359. RegisterUnityClass<MonoScript>("Core");
  360. //40. NamedObject
  361. RegisterUnityClass<NamedObject>("Core");
  362. //41. Object
  363. //Skipping Object
  364. //42. OcclusionArea
  365. RegisterUnityClass<OcclusionArea>("Core");
  366. //43. PlayerSettings
  367. RegisterUnityClass<PlayerSettings>("Core");
  368. //44. PreloadData
  369. RegisterUnityClass<PreloadData>("Core");
  370. //45. QualitySettings
  371. RegisterUnityClass<QualitySettings>("Core");
  372. //46. UI::RectTransform
  373. RegisterUnityClass<UI::RectTransform>("Core");
  374. //47. ReflectionProbe
  375. RegisterUnityClass<ReflectionProbe>("Core");
  376. //48. Renderer
  377. RegisterUnityClass<Renderer>("Core");
  378. //49. RenderSettings
  379. RegisterUnityClass<RenderSettings>("Core");
  380. //50. RenderTexture
  381. RegisterUnityClass<RenderTexture>("Core");
  382. //51. ResourceManager
  383. RegisterUnityClass<ResourceManager>("Core");
  384. //52. RuntimeInitializeOnLoadManager
  385. RegisterUnityClass<RuntimeInitializeOnLoadManager>("Core");
  386. //53. ScriptMapper
  387. RegisterUnityClass<ScriptMapper>("Core");
  388. //54. Shader
  389. RegisterUnityClass<Shader>("Core");
  390. //55. SkinnedMeshRenderer
  391. RegisterUnityClass<SkinnedMeshRenderer>("Core");
  392. //56. Sprite
  393. RegisterUnityClass<Sprite>("Core");
  394. //57. SpriteAtlas
  395. RegisterUnityClass<SpriteAtlas>("Core");
  396. //58. SpriteRenderer
  397. RegisterUnityClass<SpriteRenderer>("Core");
  398. //59. TagManager
  399. RegisterUnityClass<TagManager>("Core");
  400. //60. TextAsset
  401. RegisterUnityClass<TextAsset>("Core");
  402. //61. Texture
  403. RegisterUnityClass<Texture>("Core");
  404. //62. Texture2D
  405. RegisterUnityClass<Texture2D>("Core");
  406. //63. Texture2DArray
  407. RegisterUnityClass<Texture2DArray>("Core");
  408. //64. Texture3D
  409. RegisterUnityClass<Texture3D>("Core");
  410. //65. TimeManager
  411. RegisterUnityClass<TimeManager>("Core");
  412. //66. Transform
  413. RegisterUnityClass<Transform>("Core");
  414. //67. ParticleSystem
  415. RegisterUnityClass<ParticleSystem>("ParticleSystem");
  416. //68. ParticleSystemRenderer
  417. RegisterUnityClass<ParticleSystemRenderer>("ParticleSystem");
  418. //69. BoxCollider
  419. RegisterUnityClass<BoxCollider>("Physics");
  420. //70. CapsuleCollider
  421. RegisterUnityClass<CapsuleCollider>("Physics");
  422. //71. Collider
  423. RegisterUnityClass<Collider>("Physics");
  424. //72. MeshCollider
  425. RegisterUnityClass<MeshCollider>("Physics");
  426. //73. PhysicMaterial
  427. RegisterUnityClass<PhysicMaterial>("Physics");
  428. //74. PhysicsManager
  429. RegisterUnityClass<PhysicsManager>("Physics");
  430. //75. Rigidbody
  431. RegisterUnityClass<Rigidbody>("Physics");
  432. //76. SphereCollider
  433. RegisterUnityClass<SphereCollider>("Physics");
  434. //77. BoxCollider2D
  435. RegisterUnityClass<BoxCollider2D>("Physics2D");
  436. //78. CircleCollider2D
  437. RegisterUnityClass<CircleCollider2D>("Physics2D");
  438. //79. Collider2D
  439. RegisterUnityClass<Collider2D>("Physics2D");
  440. //80. Physics2DSettings
  441. RegisterUnityClass<Physics2DSettings>("Physics2D");
  442. //81. Rigidbody2D
  443. RegisterUnityClass<Rigidbody2D>("Physics2D");
  444. //82. TextRendering::Font
  445. RegisterUnityClass<TextRendering::Font>("TextRendering");
  446. //83. UI::Canvas
  447. RegisterUnityClass<UI::Canvas>("UI");
  448. //84. UI::CanvasGroup
  449. RegisterUnityClass<UI::CanvasGroup>("UI");
  450. //85. UI::CanvasRenderer
  451. RegisterUnityClass<UI::CanvasRenderer>("UI");
  452. }