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

THE CODE IN THIS REPO DOES NOT WORK #12

Open
netlander opened this issue Aug 8, 2022 · 3 comments
Open

THE CODE IN THIS REPO DOES NOT WORK #12

netlander opened this issue Aug 8, 2022 · 3 comments

Comments

@netlander
Copy link

Great to see some examples for the new UI Toolkit. However, what would be really helpful is to make the entire repo as a Unity project and add a sample scene to each example.

Currently there are class name conflicts that are preventing the import of the entire repo into a single Unity project.

If the decision is taken to go with the above mentioned conversion I might find time to assist.

@netlander netlander changed the title Convert the Repository into a Unity Project with Sample Scenes THE CODE IN THIS REPO DOES NOT WORK Aug 9, 2022
@netlander
Copy link
Author

It seems that most of the code is Editor UI and NONE OF IT WORKS.

@lilisha-unity
Copy link
Collaborator

hi @netlander, thank you for your feedback. The code in this repo won't work by itself. This repo's code examples are for the UI Toolkit user manual. You must follow the steps in the user manual in order to have the code work. For example, this page teaches you how to create a drag-and-drop UI inside a custom Editor window. You can either copy/paste the code on the page or get the files from this repo (https://github.com/Unity-Technologies/ui-toolkit-manual-code-examples/tree/master/create-a-drag-and-drop-window-inside-a-custom-editor-window).

@bradley-newman
Copy link

would be nice if the examples were organized by assembly definitions to avoid the need to import each example separately. And used relative paths for assets instead of the hard coded paths like this:

var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Editor/DragAndDropWindow.uxml");

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

3 participants