nexys.stormcloud Posted March 5, 2025 Posted March 5, 2025 (edited) I have an abstract class AbstractEngine and a class Engine that inherits from it. (class does not inherit from Component, but the Engine class is included in the component). How can I display public fields of AbstractEngine parent class in the editor? public fields of the Engine are displayed, but public fields of the parent class are not. [showInEditor] [ParameterProperty] also does not give any result Edited March 5, 2025 by nexys.stormcloud
silent Posted March 6, 2025 Posted March 6, 2025 nexys.stormcloud Can you show us example .cs component? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
nexys.stormcloud Posted March 6, 2025 Author Posted March 6, 2025 1 hour ago, silent said: nexys.stormcloud Can you show us example .cs component? Thanks! Hi, thanks for quick reply! //parent class Public abstract class AbsEngine { public float power; } //child class Public class FuelEngine:AbsEngine{ public float fuel; } //component that includes child class [Component(PropertyGuid="...")] public class FlyerChassy:Component { //-----// [ShowInEditor] FuelEngine[] engines; //-----// } result in editor: child field 'fuel' is displayed, but inherited parent field 'power' is not. thanks. 1
silent Posted March 7, 2025 Posted March 7, 2025 Thanks for the example, it's very helpful! Looks like there is a bug in C# Property generator that can't handle such syntax. We plan to fix this issue in the upcoming update (2.20) later this spring. 2 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts