CSharpWrap.txt 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Classes that need C# wrappers:
  2. Math (Instead of a wrapper create actual C# classes, but which map 1-1 with C++ code so we can move them through C++/C# boundaries):
  3. -Vector2
  4. -Vector3
  5. -Vector4
  6. -Matrix3
  7. -Matrix4
  8. -Quaternion
  9. -Rect
  10. -Int2
  11. -Color
  12. Resources:
  13. - Mesh
  14. - Texture
  15. - Font
  16. - Material
  17. - GpuProgram
  18. - Technique
  19. - Shader
  20. - DepthStencil/Blend/Rasterizer/Sampler state
  21. Core objects:
  22. - RenderTarget
  23. - RenderWindow
  24. - RenderTexture
  25. - MultiRenderTexture
  26. - SceneObject
  27. - Component
  28. - plus specific components Camera, Renderable, maybe others
  29. - (later ofc ability to derive custom C# components)
  30. GUI:
  31. - EditorWindow
  32. - GUIWidget
  33. - GUILabel/GUIButton/GUIToggle/GUIInputBox/GUITexture...
  34. - GUILayoutX/GUILayoutY/GUILayoutOptions
  35. - GUISkin/GUIElementStyle
  36. Systems:
  37. - Resources
  38. - Importer
  39. - Application (startUp/shutDown)
  40. - Cursor
  41. - Debug
  42. - Input
  43. - Time
  44. -----------------
  45. But which ones will I need initially?
  46. - [EditorApplication] - Entry point. Creates a MainEditorWindow
  47. - [EditorWindow] (Scene, Project, Hierarchy, etc.)
  48. - show()/hide()
  49. - [MainEditorWindow]
  50. - Slight variation of EditorWindow as there can be only one of them
  51. - Contains [TitleBar], [DockManager]
  52. - When adding GUI elements I need to make it easy to add game GUI elements,
  53. but also make a distinction and make it possible to add editor GUI elements.
  54. - Each EditorWindow contains a [GUIWidget] (created by default)
  55. - This GUIWIdget is created specially with EditorWindow as its target
  56. - GUIWidget is also a Component which can be used for rendering to Game view
  57. - All game GUIWidgets are created with Game render target as their target
  58. - [GameObject], [Component]
  59. - Need something to add GUIWidget to
  60. - I need to have [Application] running within EditorApplication
  61. - So when I remove EditorApplication everything runs as normal
  62. - How to make the distinction?
  63. - Application needs to render to RenderTarget when in editor, and have its own window when standalone
  64. - When in Editor, EditorApplication will call application and tell it to create a render target
  65. - When published I will have a Game class, which will also call Application and run it in a window
  66. - Certain components should only exists in editor (Like Scene camera, gizmos and etc.)
  67. - Add a flag to GameObjects like in Unity, that can hide the object in Hierarchy, or make it not save
  68. - Editor objects would be hidden and would not save with the level, which would make publishing work
  69. - GUIWidget
  70. - [GUILayoutX], [GUILayoutY], [GUIArea], [GUISpace], [GUIFlexibleSpace]
  71. - [GUIElement]
  72. - [GUILabel], [GUIButton], etc.
  73. - TODO: GUISkin? - Will I need to create interface for textures and resource loading/importing as well? Probably
  74. -----------------
  75. Notes:
  76. - I will need RequireComponent[] attribute. This attribute should automatically add the specified class to the wanted
  77. GameObject. This is useful if you suddenly decide your class is now dependant on another, but you would otherwise have to manually
  78. go through all instances of that GameObject in scene and add the required component.
  79. - HOWEVER, a more generic way of doing this (maybe using prefabs) would be useful. Because what happens when a class suddenly becomes
  80. dependant on a resource, or a specific instance of a class? In that case we cannot use RequireComponent.
  81. - Use FrameUpdate[QueueIdx], OnCreate[QueueIdx], OnDestroy[QueueIdx] attributes to signify to the scripting system when to execute
  82. certain methods. QueueIdx allows you to specify the order in which these methods will be called. In Unity you have Awake and Start methods
  83. for initialization, but here you may just specify OnCreate[0] and OnCreate[1].
  84. - I will likely need C++ equivalents of these queues because C++ components will also require such ordering.