Jump to content

Fields don't show up in editor


photo

Recommended Posts

Posted

I am having trouble with the fields in my C# component not showing up in the Node Properties section of the Parameters window.

I have a PlayerJump component attached to an object of type ObjectMeshStatic with 2 fields which I want to be able to modify in-editor. One of them is a jump key, a key on the keyboard I want to use for jumping, and a jump force.

using Unigine;

[Component(PropertyGuid = "7f93b2a9029f5bf4d7fdd6c350ef8d4696b903ed")]
public class PlayerJump : Component
{
	[Parameter(Title = "Jump Key")]	
	public Input.KEY jumpKey = Input.KEY.SPACE;
	[Parameter(Title = "Jump Force")]
	public float jumpForce = 10f;
	
	private BodyRigid rigidBody;

	private void Init()
	{
		rigidBody = node.ObjectBodyRigid;
	}

	private void Update()
	{
		if(Input.IsKeyDown(jumpKey) && rigidBody)
		{
			rigidBody.AddForce(vec3.UP * jumpForce);
		}
	}
}

Neither of them show up in the editor (demonstrated in the included GIF), even if I make them public or make them private and add the ShowInEditor attribute. The fields don't show up in my current project, a new clean project or even the C# Third Person Platformer demo.

Is there perhaps a tick box I haven't ticked on somewhere or am I declaring the properties wrong or is there something else going on?

unigine why 2.gif

Posted

Hello! Thank you for your fast response.

I've sent the log files to you in a PM.

Posted

Reimporting doesn't seem to be doing anything.

Maybe it's an issue with my installation. I'll try reinstalling my Unigine Browser, SDK and .NET Core.

Posted

i think that u have to add [ShowInEditor]  before :

[ShowInEditor]
[Parameter(Title = "Jump Key")]	
public Input.KEY jumpKey = Input.KEY.SPACE;

 

Posted (edited)

Ok, reinstalled everything.

The original project still doesn't want to show the fields even after manually reimporting the component several times like you told me, however pasting the contents of the PlayerJump class into a new component class created in a new clean project seems to remove the issue even for entirely new components, so I guess the issue lied in the previous installation or lies in the project itself, because the original .cs file still doesn't work even in the new project.

Thank you for your help!

Edited by jan.aler
Posted

If possible could you please zip the data folder of your problematic project and upload it somewhere (you can use our secure ftp as well)? We want to find out what is the root cause of this issue.

Looks like wrong filesystem guids, but I'm not sure yet.

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

Posted (edited)

Nevermind, made a new project and it doesn't work again.

I'll send you the folder through PMs.

Edited by jan.aler
  • 1 month later...
Posted (edited)

Hello everyone!
Did You solve this problem? I have the same issue I guess...

Edited by vasiliy.kuznetsov
Posted

There is a bug in 2.11.x SDK that prevents fields to show up if you have spaces in AssemblyName inside *.csproj file. You can fix it by modifying *.csproj file manually:

 

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

×
×
  • Create New...