Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0 KiB

  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using System;
  4. namespace AmplifyShaderEditor
  5. {
  6. [Serializable]
  7. public class TemplateAdditionalIncludesHelper : TemplateAdditionalParentHelper
  8. {
  9. public TemplateAdditionalIncludesHelper() : base( "Additional Includes" )
  10. {
  11. m_helpBoxMessage = "Please add your includes without the #include \"\" keywords";
  12. }
  13. public override void AddToDataCollector( ref MasterNodeDataCollector dataCollector , TemplateIncludePragmaContainter nativesContainer )
  14. {
  15. for( int i = 0; i < m_additionalItems.Count; i++ )
  16. {
  17. if( !string.IsNullOrEmpty( m_additionalItems[ i ] ) && !nativesContainer.HasInclude( m_additionalItems[ i ] ) )
  18. dataCollector.AddToIncludes( -1, m_additionalItems[ i ] );
  19. }
  20. for( int i = 0; i < m_outsideItems.Count; i++ )
  21. {
  22. if( !string.IsNullOrEmpty( m_outsideItems[ i ] ) && !nativesContainer.HasInclude( m_outsideItems[ i ] ) )
  23. dataCollector.AddToIncludes( -1, m_outsideItems[ i ] );
  24. }
  25. }
  26. }
  27. }