• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

aosoft/Xamarin.Forms.Unity: Xamarin.Forms for Unity (Platform implementation for ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

aosoft/Xamarin.Forms.Unity

开源软件地址:

https://github.com/aosoft/Xamarin.Forms.Unity

开源编程语言:

C# 100.0%

开源软件介绍:

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).

Requirements

Try the sample

  1. Import "Xamarin.Forms" from NuGet.
  2. Import "UniRx" from Unity Asset Store or GitHub.
  3. Open "Assets/main.unity" or "Assets/XamlPad.unity" scene file.
  4. 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 "Xamarin.Forms".
    1. Download from NuGet Package (Ver.4.0.0.425677) (https://www.nuget.org/packages/Xamarin.Forms) .
    2. Change the extension from nupkg to zip. And unpack.
    3. Copy dlls from lib/netstandard2.0 to Unity Project (ex. Assets/Xamarin.Forms.Unity/Plugins) .
  5. Import "UniRx".
  6. Create App class that inherits Xamarin.Forms.Application.
  7. Create FormsApplicationActivity class that inherits Xamarin.Forms.Platform.Unity.UnityFormsApplicationActivity. T is Application class that implemented earlier.
  8. Create Prefabs of UI Comoponent. (Canvas, Button, Text, InputField etc.)
  9. Create "UI - Canvas" on the Hierarchy of Unity scene. This Canvas is UI Root of Xamarin.Forms.
  10. Create "Xamarin.Forms Application Activity(User defined)" on the Hierarchy of Unity scene. This Activity must be singleton.
  11. Set Prefabs of UI Component and Root Canvas to Activity.

Known Issues

  • XAML Loader does not work with IL2CPP 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.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
andrewrk/chem: 2d canvas-based rapid prototyping game engine发布时间:2022-06-07
下一篇:
aeonofdiscord/squarepig: A simple HTML5 game engine发布时间:2022-06-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap