René's URL Explorer Experiment


Title: `MenuController` base class for the UI Toolkit · Issue #69 · UnityCommunity/UnityLibrary · GitHub

Open Graph Title: `MenuController` base class for the UI Toolkit · Issue #69 · UnityCommunity/UnityLibrary

X Title: `MenuController` base class for the UI Toolkit · Issue #69 · UnityCommunity/UnityLibrary

Description: Hello, I want to propose adding a system that I have implemented in previous projects of mine that use the Unity UI Toolkit. It consists of a base class MenuController which is linked to a UXLM document or a Visual Element (the view). Wh...

Open Graph Description: Hello, I want to propose adding a system that I have implemented in previous projects of mine that use the Unity UI Toolkit. It consists of a base class MenuController which is linked to a UXLM doc...

X Description: Hello, I want to propose adding a system that I have implemented in previous projects of mine that use the Unity UI Toolkit. It consists of a base class MenuController which is linked to a UXLM doc...

Opengraph URL: https://github.com/UnityCommunity/UnityLibrary/issues/69

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`MenuController` base class for the UI Toolkit","articleBody":"Hello, I want to propose adding a system that I have implemented in previous projects of mine that use the Unity UI Toolkit.\n\nIt consists of a base class `MenuController` which is linked to a UXLM document or a Visual Element (the view). When inheriting from it, allows you to add a new attribute I've defined called `QueryFromView` applicable to fields of type `VisualElement` (or subclasses) so that field is automatically initialized to an specific element from the view.\n\n![Image](https://github.com/user-attachments/assets/b2a16358-8298-47ff-b84f-b81f5fc77a3e)\n\nYou can query by name, type, or both.\n\nIt counts with explanatory error and warning logs for every possible misuse of the system.\n\n- - - \n\nDepending on the project, I use two different variants:\n\n### Variant 1: `EditorWindow` and controller are independent\n\nWhen using this option, whenever you inherit from `MenuController` you have to inherit the base constructor in your class, like this:\n\n![Image](https://github.com/user-attachments/assets/0e79e99a-f04b-4de4-8785-b3abdea6c91e)\n\nYou initialize your controller this way (unless you've added extra arguments to your constructor), where `visualTreeAsset` represents your view as a UXML document:\n\n![Image](https://github.com/user-attachments/assets/321209e4-72d9-4541-b6d4-81e168f1e13d)\n\n### Variant 2: `EditorWindow` *is* the controller\n\nWhen opting for using this variant, you don't have to worry about constructors or inicialization. However, you have to worry about dragging the UXML file that represents your view from your EditorWindow script to the `Menu UI` field in the inspector.\n\n![Image](https://github.com/user-attachments/assets/e4671de1-5eb3-443e-9ba3-fa12fdb7e534)\n\nNote that this variant does not allow you to use as a view a VisualElement that is not represented by a UXML file.\n\n- - - \n\nDoes it sound useful for your repository? In case you like it, which variant should I implement? Please let me know what you think about it.\n\n\u003e PS: Don't mind the namespaces and spanish comments. I used screenshots from a time I shared my system in a Spanish-speaking community.","author":{"url":"https://github.com/Pituivan","@type":"Person","name":"Pituivan"},"datePublished":"2025-05-29T20:25:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/69/UnityLibrary/issues/69"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:407d323a-1603-6b5f-032d-bbf7839a1b9e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB68:338AF6:4DD9519:658718C:696D2251
html-safe-nonceb97d9cd42c8faad14c836e8be7e04f31b2cb2be9cddcdcdb921da6cb507e4a0f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjY4OjMzOEFGNjo0REQ5NTE5OjY1ODcxOEM6Njk2RDIyNTEiLCJ2aXNpdG9yX2lkIjoiNzA1NDE0NTQ2NjU3OTg4NjY3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac105bf02509115683a68c9b193fabd40d52437c8545f013d32173644d04f88350
hovercard-subject-tagissue:3101406079
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UnityCommunity/UnityLibrary/69/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3f47d18f0c83e2141844ddd225b5958f38b55e0fa672a78d822d9e23bd2e0904/UnityCommunity/UnityLibrary/issues/69
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3f47d18f0c83e2141844ddd225b5958f38b55e0fa672a78d822d9e23bd2e0904/UnityCommunity/UnityLibrary/issues/69
og:image:altHello, I want to propose adding a system that I have implemented in previous projects of mine that use the Unity UI Toolkit. It consists of a base class MenuController which is linked to a UXLM doc...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePituivan
hostnamegithub.com
expected-hostnamegithub.com
None0944e430045f4fb5f7bd103e0660080acfe593174063212555773ca41c144a14
turbo-cache-controlno-preview
go-importgithub.com/UnityCommunity/UnityLibrary git https://github.com/UnityCommunity/UnityLibrary.git
octolytics-dimension-user_id19302334
octolytics-dimension-user_loginUnityCommunity
octolytics-dimension-repository_id58604714
octolytics-dimension-repository_nwoUnityCommunity/UnityLibrary
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58604714
octolytics-dimension-repository_network_root_nwoUnityCommunity/UnityLibrary
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release66b6e773801d28660016072069017cfcc851f54b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FUnityCommunity%2FUnityLibrary%2Fissues%2F69
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FUnityCommunity%2FUnityLibrary%2Fissues%2F69
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=UnityCommunity%2FUnityLibrary
Reloadhttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69
Reloadhttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69
Reloadhttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69
UnityCommunity https://patch-diff.githubusercontent.com/UnityCommunity
UnityLibraryhttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FUnityCommunity%2FUnityLibrary
Fork 457 https://patch-diff.githubusercontent.com/login?return_to=%2FUnityCommunity%2FUnityLibrary
Star 4.3k https://patch-diff.githubusercontent.com/login?return_to=%2FUnityCommunity%2FUnityLibrary
Code https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary
Issues 13 https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues
Pull requests 0 https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/pulls
Discussions https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/discussions
Actions https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/actions
Projects 0 https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/projects
Wiki https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/security
Please reload this pagehttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69
Insights https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/pulse
Code https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary
Issues https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues
Pull requests https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/pulls
Discussions https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/discussions
Actions https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/actions
Projects https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/projects
Wiki https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/wiki
Security https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/security
Insights https://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/UnityCommunity/UnityLibrary/issues/69
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/UnityCommunity/UnityLibrary/issues/69
MenuController base class for the UI Toolkithttps://patch-diff.githubusercontent.com/UnityCommunity/UnityLibrary/issues/69#top
https://github.com/Pituivan
https://github.com/Pituivan
Pituivanhttps://github.com/Pituivan
on May 29, 2025https://github.com/UnityCommunity/UnityLibrary/issues/69#issue-3101406079
https://private-user-images.githubusercontent.com/170821672/448984882-b2a16358-8298-47ff-b84f-b81f5fc77a3e.png?jwt=eyJ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XslTsDT4wU6LvVZc
https://private-user-images.githubusercontent.com/170821672/448990791-e4671de1-5eb3-443e-9ba3-fa12fdb7e534.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg3NjAxOTAsIm5iZiI6MTc2ODc1OTg5MCwicGF0aCI6Ii8xNzA4MjE2NzIvNDQ4OTkwNzkxLWU0NjcxZGUxLTVlYjMtNDQzZS05YmEzLWZhMTJmZGI3ZTUzNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDExOFQxODExMzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zOTkwMDg5YTljYjc3YjNjNzgxYzU5YTRhMTRlOGI5Yjc2YWY3YzllNzg3ZTBmM2Y0NWFiNDUxNTg3ZWNiNzM5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.rjG4Co5aJY_SJQJ6zVdvB0ssBWDqD5BQOEPac9SvRHg
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.