mirror of
https://github.com/OMGeeky/UnityCodeGenerators.git
synced 2025-12-27 23:08:04 +01:00
cleanup
This commit is contained in:
@@ -108,13 +108,8 @@ internal class {Helpers.UiElementAttribute} : Attribute
|
||||
return null;
|
||||
|
||||
List<ISymbol> elementFields = fieldsList.Where( f => GetUiElementAttributeData( f , uiElementAttributeSymbol ) != null ).ToList();
|
||||
|
||||
foreach ( var VARIABLE in elementFields )
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
var uxmlTraitFields = fieldsList.Where( f => GetUxmlTraitAttributeData( f , uxmlTraitAttributeSymbol ) != null ).ToList();
|
||||
List<ISymbol> uxmlTraitFields = fieldsList.Where( f => GetUxmlTraitAttributeData( f , uxmlTraitAttributeSymbol ) != null ).ToList();
|
||||
|
||||
var source = new StringBuilder( $@"// <auto-generated/>
|
||||
|
||||
using UnityEngine.UIElements;
|
||||
@@ -146,7 +141,7 @@ public partial class {classSymbol.Name}
|
||||
|
||||
foreach ( ISymbol fieldSymbol in uxmlTraitFields )
|
||||
{
|
||||
source.AppendLine( GetAttributeInitialization( fieldSymbol , uxmlTraitAttributeSymbol ) );
|
||||
source.AppendLine( GetAttributeInitialization( fieldSymbol ) );
|
||||
}
|
||||
|
||||
source.Append( $@" }}
|
||||
@@ -333,7 +328,7 @@ public partial class {classSymbol.Name}
|
||||
|
||||
private static string GetQualifyingTypeName( ITypeSymbol type ) { return type.ToDisplayString( SymbolDisplayFormat.FullyQualifiedFormat ); }
|
||||
|
||||
private string GetAttributeInitialization( ISymbol symbol , ISymbol attributeSymbol )
|
||||
private string GetAttributeInitialization( ISymbol symbol )
|
||||
{
|
||||
// self.PlayerHealth = m_PlayerHealth.GetValueFromBag( bag , cc );
|
||||
return $" self.{symbol.Name} = {GetAttributeDescriptionName( symbol.Name )}.GetValueFromBag( bag , cc );";
|
||||
|
||||
Reference in New Issue
Block a user