Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Settings doesn't appear with a custom editor #718

Closed
PourrezJ opened this issue Mar 22, 2021 · 4 comments
Closed

Sync Settings doesn't appear with a custom editor #718

PourrezJ opened this issue Mar 22, 2021 · 4 comments

Comments

@PourrezJ
Copy link

Describe the bug
If you use a [SyncVar] custom attribute in one of the class and you use a custom editor with, the
sync settings side doesn't appear at the bottom.

Repro project
https://1drv.ms/u/s!AsPgjMI5fds-gbxw4rf0KF1A-zdKdA?e=G71xlz

To Reproduce
Steps to reproduce the behavior:

  1. Open the attached project 'Mirage'
  2. Click on 'GameObject' on sample scene
  3. Scroll down to the compoment 'MyObject'
  4. See error

Expected behavior
The sync var settings

Screenshots
https://prnt.sc/10su1ur

Desktop:

  • OS: Windows
  • Unity version: 2020.3.0f1
  • Mirage version: 81.0.2
@uweeby
Copy link
Member

uweeby commented Mar 26, 2021

Is your custom class of type NetworkBehaviour? The existing editor script that applies SyncSettings is only for that type or its derivatives.

I am unable to easily access the repro project as it requires signing into OneDrive.

@PourrezJ
Copy link
Author

Yes of course, he is a child of NetworkBehaviour.

https://mega.nz/file/hAo2nBjT#AWCAnQ5zHHBXB97tvVcubiu_SwJ4SogWhVSih4ILlQI

@uweeby
Copy link
Member

uweeby commented Mar 26, 2021

Is this what you are trying to do?

image

If so then do this:
public class MyObjectEditor : NetworkBehaviourInspector

@PourrezJ
Copy link
Author

Oh no I had not seen, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants