Git Product home page Git Product logo

uquery's Introduction

πŸ”₯ Unity Query πŸ”₯

Library for querying unity gameobject

OpenUPM

πŸ“¦ Install

openupm add com.ivysola.uquery

or paste this into manifest.json

"com.ivysola.uquery": "https://github.com/0xF6/UQuery.git?path=src/",

πŸ“Œ Usage

/* graph of game objects
  %scene_root% |
        - Canvas |
            - Layout |
                - Header |
                    - Title | <UIText>
*/

var result = UQuery.SelectByPath<UIText>("Canvas>Layout>Header>Title[UIText]");
result // UIText component

var result = UQuery.SelectByPath<GameObject>("Canvas>Layout>ButtonGroup");
result // GameObject 'ButtonGroup'

/*
%root% |
    - Canvas |
        - Layout |
            - Header |
                - Title1
            - Header |
                - Title2
            - Header |
                - Title3
            - Header |
                - Title4
*/

var result = UQuery.SelectByPath<UIText>("Canvas>Layout>Header:(2)>Title3");
result // GameObject 'Title3'

🧬 Roadmap

  • Light Documentation
  • Samples
  • Validate IL2CPP Target
  • Directives for MORELINQ & UNITY_LINQ
  • Support querying by tag\layout (?)
  • Aliases in Query Path
  • Strong validation path format
  • Additional exceptions types
  • Query cache system
  • Access child (same names) by index

βš™οΈ Unity Version Support

So, the code of this library uses C# 8.0 version, upm puts the source code in its pure form, and unity compiles it with its internal compiler - so the minimum supported version of the package is 2020.2. if you want to use this library on older versions of the engine, the compiled library (built in Plugins) can also work on version 2019.* or you can use C# Custom compiler for set-up your 2019.* unity to you to compile C# 8.0 in packages asmdef.

uquery's People

Contributors

0xf6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

594270461

uquery's Issues

A few unimportant questions

Hey there,
This seems like a really interesting system and could be really useful. I see it has not been updated in quite some time, though, and there were quite a few things still on the "todo" list. Any plans on revisiting this project? I think it could really catch on. How does it perform? Have you happen to have done any sort of tests of your own or anything? I wonder what the difference ends up being vs other methods of trying to narrow down to specific items in the hierarchy.

Thanks,
-MH

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.