• Stars
    star
    166
  • Rank 221,049 (Top 5 %)
  • Language
    C#
  • License
    Other
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

https://pixiv.github.io/Mux/

Mux

Mux provides data binding infrastructure to Unity.

Features

Mux is useful as a powerful UI toolkit on Unity, integrated with Mux.Markup.UI.

  • Fully Open-source including dependencies (except Unity itself)
  • Hackable
  • Text-based representation
  • No more clicking and dragging
  • Easy to merge
  • Fully managed
  • Full stacktrace
  • High portability
  • High stablity
  • Compiler-backed
  • Less overhead
  • uGUI-backed
  • Easy to migrate to/from uGUI
  • Powers Unity Editor Inspector
  • Has rich documentation
  • Xamarin.Forms-backed
  • Proven data template/data binding infrastructure for UI
  • Has rich documentation
  • Familiar for Xamarin.Forms/WPF developers
  • Minimal
  • High maintainability
  • Hot Reload
  • Fast iteration

Installation

Unity Editor must be 2020.2 or possibly newer.

First, add this repository to the Project manifest as com.pixiv.mux, a dependency.

You will need Mux.Markup.UI (com.pixiv.mux.markup.ui) if you would like to integrate Mux with uGUI. Mux.Markup.Animation (com.pixiv.mux.markup.animation) is for animation.

The target framework must be ".NET 4.x".

API

The following APIs are available:

Full APIs of System.Collections.Immutable

System.Collections.Immutable "provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections."

Xamarin.Forms XAML Runtime

Xamarin.Forms XAML compiler and markups in MS-XAML-2009 are available. The difference from the original runtime is that it compiles XAML by default.

You can also write your own markup extension using Xamarin.Forms.Xaml.IMarkupExtension. It can be annoted with Xamarin.Forms.AcceptEmptyServiceProviderAttribute, just like Xamarin.Forms markup extensions are.

DataTemplate and DataTemplateSelector are available.

Xamarin.Forms data binding infrastructure

In addition to markups in [MS-XAML-2009], a data binding infrastructure is proted from Xamarin.Forms. Specifically, it includes:

Mux APIs

Mux APIs provide Unity-specific runtime services and markups for Unity objects. Its documentation can be built with DocFX.

The playground and caveats

The documentation has a playground and exhibits examples with the component. However, there are something to be noted:

Building documentation

Building documentation requires the following:

  • MSBuild
  • NPM
  • Node.js

The following subprojects must be prepared as well:

  • Mux.Markup.Animation at .build/doc
  • Mux.Markup.UI at .build/doc
  • Xamarin.Forms modified for Mux at .build

Run Build target of .build/doc/doc.msbuildproj. PATH environment variable must be configured so that Unity, npm, and npx can be resolved.

DocFX Template

DocFX template used for the documentation is available at .docfx_template. It is also used for VRoid SDK documentation.

You need to merge it with the default template of DocFX to make it functional.

Incompatibility with IL2CPP

The Interpreter

IL2CPP does not provide the constructor arguments of custom attributes. Due to that restriction, important attributes such as Xamarin.Forms.ContentPropertyAttribute will not work with the interpreter.

A workaround is to use the compiler.

Data binding

Normal data binding relies on reflection, and Unity linker fails to figure out dependencies on a property. You have two options to resolve the problem:

  1. Use compiled bindings.

  2. Configure Unity Linker accordingly to prevent properties from being stripped.

See an article of Unity describing Unity linker.

Development

Coding Style

Mux conforms to the .NET Core C# Coding Style. Use modified CodeFormatter to format your code when developing Mux.

CodeFormatter /copyright:Copyright.txt CodeFormatter.rsp

Documentation

Provide documentations for public APIs. Please make sure DocFX does not emit any warnings nor errors.

Provide cross references to Unity with hyperlinks. You should check if the number of unresolved uid is increased by passing --logLevel Verbose when building the documentation.

Xamarin.Forms internal dependencies

Although modifications of Xamarin.Forms made for Mux is minimal, Mux depends on a number of internal interfaces:

Changes for those interfaces must be reviewed when altering Xamarin.Forms libraries.

External dependencies

Mux includes external dependencies. You can remove existing dependencies and recreate.

Run Clean target of .build/Mux.msbuildproj to clean all dependencies.

Run its Build target on Mono to recreate.

Licenses

See Licenses directory or "Licenses" article of the documentation.

More Repositories

1

three-vrm

Use VRM on Three.js
TypeScript
1,099
star
2

ChatVRM

TypeScript
622
star
3

go-thumber

dynamic JPEG thumbnailing proxy written in Golang
Go
292
star
4

charcoal

Design system library by pixiv
TypeScript
289
star
5

go-libjpeg

An implementation of Go binding for libjpeg (or libjpeg-turbo).
Go
152
star
6

webrtc

This is a fork of WebRTC made by pixiv Inc.
C++
108
star
7

ios-tutorial

iOSアプリ開発の学習用リポジトリ
Swift
107
star
8

zip_player

pixiv ugoira player
JavaScript
101
star
9

vroid-sdk-developers

forum for vroid sdk developers
85
star
10

charcoal-ios

Design system library by pixiv
Swift
53
star
11

go-libwebp

An implemantaion of Go bindings for libwebp.
Go
42
star
12

charcoal-android

Design system library by pixiv
Kotlin
28
star
13

gifsplit

gif animation frame extractor
C
24
star
14

intern2014w

19
star
15

musicvideo-generator

JavaScript
17
star
16

intern2015w

PHP
16
star
17

Mux.Markup.UI

https://pixiv.github.io/Mux/
C#
14
star
18

.editorconfig

14
star
19

passport-pixiv

pixiv authentication strategy for Passport and Node.js.
JavaScript
14
star
20

scalafix-pixiv-rule

Generic refactoring rules available in scalafix
Scala
13
star
21

VRoidHub-API-Example

TypeScript
11
star
22

Mux.Markup.Animation

https://pixiv.github.io/Mux/
C#
8
star
23

pixiv-novel-parser

pixiv-novel-parser
JavaScript
8
star
24

pixiv-api-ruby-public

Ruby
8
star
25

omniauth-pixiv-public

Ruby
7
star
26

activerecord-dowsing

Ruby
4
star
27

ios-ci-salt-states

SaltStack
3
star
28

manga-segment

TypeScript
2
star
29

lambda-pudding

AWS Lambdaを使って広告をバンディットアルゴリズムで最適化するインターン課題
JavaScript
2
star
30

ios-tutorial-api-mock

pixiv/ios-tutorial で使用するライブラリです
Swift
2
star
31

rzicon

pixiv-pro.com (distribute by heroku)
Ruby
1
star
32

go-fluent-quicksilver

Faster log transfer to Fluentd
Go
1
star