DynamicSheetPlugin







DynamicSheetPlugin


Lorem ipsum dolor sit amet, at mei dolore tritani repudiandae. In his nemore temporibus consequuntur, vim ad prima vivendum consetetur. Viderer feugiat at pro, mea aperiam




Engine:

Unity 2021.3.10 (LTS) or later



Render Pipeline:

Build-in, URP, HDRP, and all other custom RPs



  • Graphics APIs:

DX11, Metal, Vulkan 




Features of DynamicSheetPlugin


  • Generate C# code from custom syntax files.


  • Convert Excel sheets into Unity data files.


  • Open sheet data in the Unity Sheet Viewer.


  • Simple APIs to load and get data objects.


  • Easy integration into existing projects.




How To Use



 Prepare the excel data file. There are rules to follow.


  • The first row contains the column names.
  • The second row specifies the data type for each field.
  • The sheet to convert must be named “Import”.










Open Sheet Manager.Click menu item “Window / Dynamic Sheet /Sheet Manager”.




Setup Sheet Manager








  • Syntax File



  • Excel Directory



  • CSharp Directory



  • Sheet Directory







  • The Code template file path. Dynamic Sheet would generate C# code by this file (You can also define a java syntax file).



  • A directory path to excel files.



  • A target directory path to CSharp code generated by Dynamic Sheet.



  • A target directory path to Sheet data files generated by Dynamic Sheet.






If excel files exist in the “Excel Directory”, Dynamic Sheet will list them in the Sheet Manager window.



  • Click the “->” button to convert a single excel file.
  • Click the “Generate All” to convert all excel files.
  • Click the “Open” button beside xxx.sheet to Open the Sheet Viewer.






With the default csharp syntax, loading and getting data into project just needs 2 steps:



  •   Write a loading function to load the sheet data from the sheet file path set in the Sheet Manager window.
  •   Call XXXXConfig.Use get(id) to retrieve the data by unique ID.







My heading is awesome


  • Dynamic Sheet provides a default C# syntax file and you can use it in your work. You can find it in the directory “/Assets/Leansocket/DynamicSheet/Editor”.
  • Dynamic Sheet also provides some syntax variables and commands to help you define your custom syntax files.









  • ${ClassName}



  • ${FieldType}



  • ${FieldName}



  • #{ForEachField}







  • Variable: Current Table Name.



  • Variable: Current Field Type



  • Variable: Current Field Name



  • Command: foreach loop for the sheet fields.