Hello, I making a Custom Component, but the properties doesnt show in basic tap.
I got this:
public
const
DefaultDistancia = 50;
property Direccion: TVector3 read Fdireccion write Setdireccion;
property Velocidad: TVector3 read Fvelocidad write Setvelocidad;
published
property Distancia: single read FDistancia write SetDistancia default
DefaultDistancia;
property DireccionPersistent: TCastleVector3Persistent read FDireccionPersistent;
property VelocidadPersistent: TCastleVector3Persistent read FVelocidadPersistent;
if ArrayContainsString(PropertyName, [‘VelocidadPersistent,DireccionPersistent’]) then
begin
Result := [psBasic];
end
else
begin
Result := inherited PropertySections(PropertyName);
// Result := [psBasic];
end;
If I “force” resutl to psbasic the propierties are show in tap. So the problem is that are not found in the array. But I don’t know why
/BlueIcaro
Hm, I don’t see any obvious error in the code you show. Checking if ArrayContainsString(PropertyName, [... follows the pattern we use throughout CGE , and our properties show in “Basic” tab OK.
You need to show a bigger piece of code (preferably a complete testcase, i.e. code that we can compile and test) to allow us to debug it.
Note: You can also debug more on your side
- e.g. from Lazarus IDE (CGE editor is a regular LCL application, you can set a breakpoint e.g. the beginning of your
PropertySections method).
- adding
WritelnLog. E.g.
WritelnLog('Checking property %s, which seems to be in array? %s', [
PropertyName,
BoolToStr(ArrayContainsString(PropertyName, [‘VelocidadPersistent,DireccionPersistent’]), true)
]);
The editor makes a regular log file, you can find it following docs Logging | Manual | Castle Game Engine (the application name of editor is castle-editor). So if you add above WritelnLog inside your PropertySections, make a test, and later look at log → you should see something that helps 
Hello, here is the complete project.
Thanks
/BlueIcaro