Git Product home page Git Product logo

xamarin.forms.unity's Introduction

Xamarin.Forms for Unity

Copyright (c) 2017 Yasuhiro Taniuchi
Copyright (c) .NET Foundation Contributors

LICENSE (MIT)
Demo (WebGL Build / 2017/9/8 Version)

About

Xamarin.Forms Platform implementation for Unity Game Engine (Unity3D).
This project contains source code of Xamarin.Forms 2.5.0-sr1.

Requirements

Try the sample

  1. Import "UniRx".
  2. Open "Assets/main.unity" or "Assets/XamlPad.unity" scene file.
  3. Edit sample source code.
  • main.unity
    • Assets/Scripts/Page1.xaml.cs
    • Assets/Scripts/SampleBindingContext.cs
  • XamlPad.unity
    • Assets/Scripts/XamlPad/XamlPadBindingContext.cs
    • Assets/Scripts/XamlPad/XamlPadPage.cs
    • Assets/StreamingAssets/XamlPadPage.xaml
  1. Run.

Getting Started

  1. Create New Unity Project.
  2. Changes "Script Runtime Version" at Player Settings to ".NET 4.6".
  3. Copy 'Assets/Xamarin.Forms.Unity' to Unity Project.
  4. Import "UniRx".
  5. Create App class that inherits Xamarin.Forms.Application.
  6. Create FormsApplicationActivity class that inherits Xamarin.Forms.Platform.Unity.UnityFormsApplicationActivity. T is Application class that implemented earlier.
  7. Create Prefabs of UI Comoponent. (Canvas, Button, Text, InputField etc.)
  8. Create "UI - Canvas" on the Hierarchy of Unity scene. This Canvas is UI Root of Xamarin.Forms.
  9. Create "Xamarin.Forms Application Activity(User defined)" on the Hierarchy of Unity scene. This Activity must be singleton.
  10. Set Prefabs of UI Component and Root Canvas to Activity.

Known Issues

  • XAML Loader does not work with WebGL Build. (maybe due to Unity (2017.1.1f1))
  • NavigationPage is not implemented in the current version.
  • Custom Renderers is not supported in the current version.
    (Please apply the design with the component of Prefab.)
  • Standard Renderers are under development.

xamarin.forms.unity's People

Contributors

aosoft avatar yjpark avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

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.