I’m trying to use the 3d game kit as a base and modify it to fit what I need. In more discoveries that unite this as hard Ias possible I’ve added public variables I want to set in the inspector however they don’t appear, then I noticed in the inspector there is this revenue section that has its variables not in the order they’re actualy written in code, and can’t find where this section is set up for the life of me. Can any one help?
Without seeing any code, my guess is that you have an unresolved compiler error and the new code hasn’t taken effect yet. 100% of all compiler errors must be fixed before any fields show in the inspector.
How to report your problem productively in the Unity3D forums:
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: https://discussions.unity.com/t/481379
If you don’t see any errors, keep this in mind:
Make sure your log console selector buttons are enabled. See this graphic:
Unfortunately, it isn’t as simple as that. there are no errors and it runs normally, stuff just doesn’t show in the inspector as written. I copied and pasted everything into another script to check and they display differently in the inspector.
Then the next thing to do is to look for a custom inspector for that script. OR… rip out one of the existing variables and see if it goes away. If you rip it out and it doesn’t go away, you know you’re not even editing the right file.
(All of my advice is based on using source control so you can RIP TEAR SHRED huge parts of the code and instantly find stuff out like this and then with one click revert it all; if you’re not using source control, STOP what you’re doing and start using source control now.)
I don’t really understand your problem, could you please elaborate a little? What exactly you’re trying to do? What public variables in what script? Could you please post partial code and screenshot where do you expect it to show up? I also see that you’re in a Prefab. Are you sure you change and then check the right thing? Prefab updating problems?
what ould that look like? I’ve never worked with inspector code. Would the 3d game kit have that? Geez for something ment to be an example they sire made ut as hard as possible to use in any other way than their demo
Best way to find a custom inspector for a class is to look for references of the classname itself.
This is what the custom inspector I wrote for my Datasack
class looks like:
[CustomEditor(typeof(Datasack)), CanEditMultipleObjects]
public class DatasackEditor : Editor
{
// class here...
}
I take your point, but often when putting a demo together they put extra stuff in to make sure the core stuff is better presented. As I said you should be using source control and rip-tear-shredding stuff to figure out what is connected to what, try changing names of variables, etc.
You also want to get super-comfortable ransacking the entire codebase looking for stuff using either the right-click-find-references feature, or just using Find In Files, which is different because it can find stuff inside of comments, for example.
Thanks for the help. Turns out there was a custom editor script hidden away