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 post

Hi Fred,

Yes, this is current limitation of C# Component System.

Right now I can't say if this is possible to implement or not. We need some additional research on this subject.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post