Jump to content

C# Components property generator unable to read structs outside component.


photo

Recommended Posts

Hi, maybe a bug, maybe an improvement suggestion for C# components....  

if you declare a struct definition within the component, the property generator correctly creates properties, but if the struct is declared outside the component, it does not create properties.

We are using struct to pass data between the components and methods in our logics layer, and we would like to declare the structs definitions in the logics layer so they can be passed to the methods themselves...

public class logic
{
	public struct Person
	{
		public string Name;
		public string Description;
	}
}

public class test : Component
{
	public struct Vehicle
	{
		public string Name;
		public string Description;
	}
	 public Vehicle Sedan; // this works in property generator
	 public Person Alex; // this does not work in property generator
}

thanks

Fred

 

 

 

 

Link to comment
×
×
  • Create New...