BioMotionLab / TUX

A framework for experiments in Unity and VR
https://biomotionlab.github.io/TUX/
Other
29 stars 4 forks source link

UNITY 2021.3.0f1 #66

Closed PanosCortese closed 2 years ago

PanosCortese commented 2 years ago

@AdamBebko I have previously used TUX with previous version of Unity. In 2021 version, everything works fine (play mode etc). However, when I try to build the project I get several errors:

Library\PackageCache\com.biomotionlab.tux@3.0.0\Scripts\Utilities\TuxLog.cs(1,19): error CS0234: The type or namespace name 'Graphs' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Scripts\Settings\bmlTUXEditorSettings.cs(39,23): error CS0246: The type or namespace name 'SerializedObject' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(7,54): error CS0234: The type or namespace name 'Editor' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(10,42): error CS0246: The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(6,6): error CS0246: The type or namespace name 'CustomEditorAttribute' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(6,6): error CS0246: The type or namespace name 'CustomEditor' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(9,6): error CS0246: The type or namespace name 'CustomEditorAttribute' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(9,6): error CS0246: The type or namespace name 'CustomEditor' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(25,30): error CS0115: 'RecorderManagerEditor.OnInspectorGUI()': no suitable method found to override

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(19,30): error CS0115: 'PlaybackManagerEditor.OnInspectorGUI()': no suitable method found to override

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(9,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(12,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(13,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(14,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

AdamBebko commented 2 years ago

It looks like there are some issues relating to your editor folders trying to be built. Can you verify that the assembly definitions in the folders listed in those error messages are indeed marked as editor only?

BmlTUX uses assembly definitions to tell unity to exclude editor-only folders from building.

My advice would be to delete your library folder when unity is not open and then open unity and let it regenerate the packages. Let me know if that helps.

Adam

Sent from my iPhone

On Jun 11, 2022, at 9:34 PM, PANAGIOTIS KOURTESIS @.***> wrote:

 Everything works fine, however when I try to build the project I get several errors:

@.***\Scripts\Utilities\TuxLog.cs(1,19): error CS0234: The type or namespace name 'Graphs' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

@.***\Scripts\Settings\bmlTUXEditorSettings.cs(39,23): error CS0246: The type or namespace name 'SerializedObject' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(7,54): error CS0234: The type or namespace name 'Editor' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(10,42): error CS0246: The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(6,6): error CS0246: The type or namespace name 'CustomEditorAttribute' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(6,6): error CS0246: The type or namespace name 'CustomEditor' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(9,6): error CS0246: The type or namespace name 'CustomEditorAttribute' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(9,6): error CS0246: The type or namespace name 'CustomEditor' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(25,30): error CS0115: 'RecorderManagerEditor.OnInspectorGUI()': no suitable method found to override

@.***\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(19,30): error CS0115: 'PlaybackManagerEditor.OnInspectorGUI()': no suitable method found to override

@.***\Extras\Recorder\Scripts\Editor\PlaybackManagerEditor.cs(9,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(12,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(13,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

@.***\Extras\Recorder\Scripts\Editor\RecorderManagerEditor.cs(14,9): error CS0246: The type or namespace name 'SerializedProperty' could not be found (are you missing a using directive or an assembly reference?)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

PanosCortese commented 2 years ago

Hi @AdamBebko, thank you for your prompt response. So, I did try to delete the library (when Unity was closed), and then opened the project to regenerate it. Unfortunately, this did not solve the issue.

I went to check what happens with the assembly definitions of BmlTux. So, I see that there are defs for Scripts and Editor folders : image

However, the Extras folder does not have any defs. So, it also does not have any dependencies (in VS now called initializers) to call the Unity related namespaces.

Similarly, some defs and initializers appear to be missing from the Utilities and Settings subfolders (subfolders of Scripts folder).

Library\PackageCache\com.biomotionlab.tux@3.0.0\Scripts\Settings\bmlTUXEditorSettings.cs(39,23): error CS0246: The type or namespace name 'SerializedObject' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.biomotionlab.tux@3.0.0\Scripts\Utilities\TuxLog.cs(1,19): error CS0234: The type or namespace name 'Graphs' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

AdamBebko commented 2 years ago

Ok I’m on vacation currently but will be back on Wednesday. I’ll try to take a look. If it’s not too difficult would you be able to send me your project so I can take a look at how it’s set up?

Adam

Sent from my iPhone

On Jun 12, 2022, at 11:13 AM, PANAGIOTIS KOURTESIS @.***> wrote:

 Hi @AdamBebko, thank you for your prompt response. So, I did try to delete the library (when Unity was closed), and then opened the project to regenerate it. Unfortunately, this did not solve the issue.

I went to check what happens with the assembly definitions of BmlTux. So, I see that there are defs for Scripts and Editor folders :

However, the Extras folder does not have any defs. So, it also does not have any dependencies (in VS now called initializers) to call the Unity related namespaces.

Similarly, some defs and initializers appear to be missing from the Utilities and Settings subfolders (subfolders of Scripts folder).

@.***\Scripts\Settings\bmlTUXEditorSettings.cs(39,23): error CS0246: The type or namespace name 'SerializedObject' could not be found (are you missing a using directive or an assembly reference?)

@.***\Scripts\Utilities\TuxLog.cs(1,19): error CS0234: The type or namespace name 'Graphs' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

DerMilchmann commented 2 years ago

I've run into the same issues and can not compile.

The Assembly Definition for the RecorderEditor in bmlTUX/Extras/Scripts/Editor/RecorderEditor is not marked as editor and changing that fixes most of the problems.

Additionally, Scripts\Utilities\TuxLog.cs has an unused import "using UnityEditor.Graphs", which can be removed an fixes another error.

I was going to submit a pull request, but unfortunately I can not fix the last remaining issue. Presumably the Scripts\Settings\bmlTUXEditorSettings.cs should also be marked as Editor in an Assembly Definition. But since it's being used by TuxLog, it has to be in the same assembly? I tried putting it into its own and mark it as Editor only, but that won't work, because TuxLog can't find it anymore.

Not sure if this has an easy fix like the other errors or if it requires restructuring of the bmlTUXEditorSettings / TuxLog.

AdamBebko commented 2 years ago

Ok thanks for this clearer report. I’ll take a look today.

Adam

Sent from my iPhone

On Jul 11, 2022, at 8:44 AM, DerMilchmann @.***> wrote:

 I've run into the same issues and can not compile.

The Assembly Definition for the RecorderEditor in bmlTUX/Extras/Scripts/Editor/RecorderEditor is not marked as editor and changing that fixes most of the problems.

Additionally, Scripts\Utilities\TuxLog.cs has an unused import "using UnityEditor.Graphs", which can be removed an fixes another error.

I was going to submit a pull request, but unfortunately I can not fix the last remaining issue. Presumably the Scripts\Settings\bmlTUXEditorSettings.cs should also be marked as Editor in an Assembly Definition. But since it's being used by TuxLog, it has to be in the same assembly? I tried putting it into its own and mark it as Editor only, but that won't work, because TuxLog can't find it anymore.

Not sure if this has an easy fix like the other errors or if it requires restructuring of the bmlTUXEditorSettings / TuxLog.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

AdamBebko commented 2 years ago

Fixed in new build please let me know if you run into any more issues

AdamBebko commented 1 year ago

I have just confirmed these bugs. Will try to update a release this evening. Apologies for the errors.

On Jul 11, 2022, at 8:44 AM, DerMilchmann @.***> wrote:

I've run into the same issues and can not compile.

The Assembly Definition for the RecorderEditor in bmlTUX/Extras/Scripts/Editor/RecorderEditor is not marked as editor and changing that fixes most of the problems.

Additionally, Scripts\Utilities\TuxLog.cs has an unused import "using UnityEditor.Graphs", which can be removed an fixes another error.

I was going to submit a pull request, but unfortunately I can not fix the last remaining issue. Presumably the Scripts\Settings\bmlTUXEditorSettings.cs should also be marked as Editor in an Assembly Definition. But since it's being used by TuxLog, it has to be in the same assembly? I tried putting it into its own and mark it as Editor only, but that won't work, because TuxLog can't find it anymore.

Not sure if this has an easy fix like the other errors or if it requires restructuring of the bmlTUXEditorSettings / TuxLog.

— Reply to this email directly, view it on GitHub https://github.com/BioMotionLab/TUX/issues/66#issuecomment-1180364593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKKFU4ZN3GC247FQ7OWYA6TVTQJJ5ANCNFSM5YQQ5SOA. You are receiving this because you were mentioned.