Disclaimer: this is an automatic aggregator which pulls feeds and comments from many blogs of contributors that have contributed to the Mono project. The contents of these blog entries do not necessarily reflect Xamarin's position.

September 25

Performance Benchmarking in Unity: How to Get Started

As a Unity developer, you want your users to love playing your games, enjoying a smooth experience across all the platforms they may play on. What if I told you that we just made it easier to create performance benchmarks? If you want to learn how to develop games or Unity tools with an eye […]

September 24

The High Definition Render Pipeline: Getting Started Guide for Artists

In this post we will explore authoring a scene to be rendered using Unity’s High Definition Render Pipeline, also known as HDRP.  We’ll walk through starting a new HDRP Project, upgrading the Materials of any imported assets, and learn how to use the new parameters within the Material Inspector to create a realistic glass material. […]

Using NGINX to add SSL to the WebAdmin and WebUI

Using NGINX to add SSL to the WebAdmin and WebUI

Some time ago we introduced both the WebAdmin and the WebUI. The first one is the Plastic SCM's server administration and monitoring web panel, while the second is a nice web interface to browse repository content (including code reviews and even semantic diffing!) For now, both interfaces lack SSL.

By the end of the post, you should be able to browse the WebAdmin using HTTPS, as shown here

Our friend trx contributed in our forum with a quick guide on how to add SSL to the WebAdmin and WebUI using NGINX. In this blogpost, I'll walk you through an extended version of trx's guide, covering how to customize the WebAdmin's default port, install NGINX, generate a self-signed certificate (in case you don't want to invest in buying one from a trusted CA), and configuring NGINX to act as a reverse proxy for the Plastic SCM's WebAdmin and WebUI web interfaces, adding SSL support to them.

Read more »

Using the Android Designer Split View

The ability to see the design view and layout XML at the same time, side by side, was one of our most requested features for the Android Designer. With Split View, new in Visual Studio 15.8, you can switch back & forth freely between both modes of working. Edit the layout XML to see the changes immediately previewed in the designer or make changes in the designer and see the XML update.  

Using Split View

By default, Split View appears with the designer on the left and editor on the right. If you prefer the editor on the left, hit the Swap Panes button at the top of the vertical splitter bar. To make the designer pane narrower, so it has less whitespace and the editor has more room, drag the splitter.

You can also split the UI horizontally or go back to the old tabbed UI. Use the buttons at the bottom of the splitter bar to do this on a per-file basis.

Sticky Layouts

The split view window layout is sticky. It is remembered on a per file basis, so once you get the layout just right it will be used next time you open that same .axml file. The WPF/UWP XAML designer and 15.8 Xamarin.Forms Previewer all work the same. They all share the same split view UI code. 
 
Those per-file sticky settings are remembered in the hidden .vs directory, next to the solution’s .sln file. If you ever want to forget those sticky settings and have the window layouts reset to their default, exit Visual Studio and delete the .vs directory. It will be recreated.

Split View Preferences

To change the default window layout settings for all .axml files, go to Tools -> Options -> Xamarin -> Android UI Designer.  Note that sticky per-file settings override these global defaults, so you may want to delete the .vs directory to see everything switch to the new defaults.

Document Outline

Although the Android designer Document Outline is not a new feature, it’s a little hidden so you may not know about it. It’s a very handy feature especially when your page has a lot of controls. 

Click on the Document Outline vertical tab on the left to show the outline. If that tab does not appear, you may have closed the outline window earlier. Use the View -> Other Windows -> Document Outline menu item to show it again.

Once the Document Outline is visible you may want to dock it below the Toolbox window, like shown below. Use the Document Outline to see all the controls in your layout. Drag to reorder them, select to change their properties, or cut/copy/paste/delete them. It’s a great alternative to manipulating controls on the designer surface.

Upcoming Split View Features

Beyond what is currently shipped in 15.8, we have been working on more Android UI creation tooling enhancements, especially continuing to improve the text editor experience. Here’s a sampling of what’s coming:

  • You’ll be able to drag from the toolbox to the editor, not just the designer.
  • The property editor will track the current item in the text editor, letting you discover and change properties for it. Now text editor users, not just designer users, can benefit from the property editor.
  • You’ll get IntelliSense for non-layout resource XML files too, not just layout files.

Look for all of these features, and more, in our upcoming Visual Studio 2019 release.

Excited about these changes? What else would you like to see from Xamarin.Android? Have your own tips to share? Please let us know in the Xamarin forums!

The post Using the Android Designer Split View appeared first on Xamarin Blog.

September 21

Configure mergebots using config files

As you know, we're extremely happy to announce that the Plastic SCM Server is now a DevOps orchestrator!

It can now coordinate information flows from/to your issue trackers, continuous integration systems, notification services and much more!

You can configure mergebots using our webadmin interface.

But today I'm going to explain how to configure the entire system using config files.

Read more »

September 20

Add a mergebot to your repo!

Recently I described how mergebots help implement DevOps from a conceptual point of view. Today, I'm going to explain what mergebots actually look like.

A mergebot automatically merges branches once they are correctly reviewed, validated and all tests pass. You can think of it as robotic automation for the integration process. It saves on costly context switches for developers (who no longer have to go and merge your branch, the bot does this with you) and automates most of the repetitive work of integrators and build-masters.

Activity last 7 days
Read more »

Intro to 2D World Building with Sprite Shape

Sprite Shape gives you the freedom to create rich free-form 2D environments straight in Unity and decorate them as you see fit, with a visual and intuitive workflow. The tool works by dynamically tiling sprites along spline paths based on a given set of angle ranges. Read on to learn how you can work with […]

September 19

WebUI: redesigned web interface for Plastic

Not sure if you noticed, but it's already been a few weeks since we released the new WebUI. We didn't make much noise about it so it has been almost in stealth mode all this time :-)

WebUI stands for "web user interface" (yep, not very original) and it is a web-based way to browse repositories, diff code and even perform code reviews.

We already had a WebUI before. The big difference is that this one comes embedded with the server, so you don't need to do a separate setup. You don't have to configure anything on IIS or Apache like you had to before. It was a real pain to properly configure it, and that's why we decided to get rid of it. The new one is started with the server, runs on the same process, so there's nothing to configure. You start your Plastic Server and the WebUI is there.

But, it is not jus the same old thing packaged differently. It is an entire rewrite that will serve as the basis for future development. And, it already includes a great new feature that you've never seen before on a web-based version control interface: semantic diff :-)

Semantic diff in WebUI
Read more »

Get Ready for iOS 12 and Xcode 10

Support for iOS 12 and Xcode 10 to accompany Apple’s Xcode Gold Master (GM) release has just been announced! We have also published updated documentation and samples to help you quickly get started with all the latest new features. Now, build your Xamarin.iOS (and of course Xamarin.Forms for iOS) applications with Xcode 10 GM and submit your iOS 12, tvOS 12, and watchOS 5 applications to the Apple App Store.

Get Started with iOS 12

For a detailed walkthrough of getting setup with your environment, check out our Getting Started Guide for iOS 12. In short, you’ll:

  • Download and install Xcode 10 GM from the Apple App Store.
  • Download and install Xamarin.iOS from the Stable channel in VS Mac. On Windows, Visual Studio 2017 will prompt for an update as it rolls out.

And that’s it! Xcode 10 is now your default installation and it will be used by Visual Studio to build your iOS projects. Review this setting from Preferences > Projects > SDK Locations > Apple.

What’s New in iOS 12?

iOS 12 provides the next generation of existing features SiriKit and ARKit. It also introduces some new features for interacting with HealthKit and seamlessly integrating security features for strong usernames and passwords.

Siri Shortcuts
Siri continues to open up to more applications and useful scenarios by introducing Siri Shortcuts and Custom Intents. Thanks to the new intent definition file, you can describe your own intents to be supported by your app. Those intents are then what your app “donates” as shortcuts to Siri in order to initiate actions within your app experience. Each shortcut may be triggered by voice command or tapping the option when searching with Siri. Check out the Soup Chef example below that demonstrates using Siri to place an order.

Docs: https://docs.microsoft.com/en-us/xamarin/ios/platform/introduction-to-ios12/siri-shortcuts
Sample: https://developer.xamarin.com/samples/monotouch/ios12/SoupChef/

ARKit 2.0
iOS 11 introduced ARKit with a host of great features for things like using device sensors, camera features, horizontal planes (vertical planes in iOS 11.3), and face detection. Building upon that foundation, ARKit 2 delivers the next generation of augmented reality features for iOS including:

  • 3D Object detection and tracking
  • Environment Texturing – real world object reflection
  • Persist AR environments between sessions
  • Multi-person experiences

Larry O’Brien recently blogged about several of these new features in Exploring New iOS 12 ARKit Capabilities with Xamarin.

Docs: https://docs.microsoft.com/en-us/xamarin/ios/platform/introduction-to-ios12/arkit2
Sample: https://developer.xamarin.com/samples/monotouch/ios12/ScanningAndDetecting3DObjects/

Natural Language Framework
Introduced in iOS 12, the Natural Language Framework provides language recognition, word and phrases tokenization, tagging parts of speech, and more. Whether you’re just detecting if the language is Spanish or Portuguese, or perhaps wanting to combine these features with CoreML, check out our docs and sample.

Docs: https://docs.microsoft.com/en-us/xamarin/ios/platform/introduction-to-ios12/natural-language
Sample: https://developer.xamarin.com/samples/monotouch/iOS12/XamarinNL/

Hit the Ground Running

Here are a growing set of iOS 12 samples for you to explore that cover the features mentioned and much more. As we release updates and address any known issues, stay on top of all the latest details by checking for updates in Visual Studio.

Discuss this post in the Xamarin Forums

The post Get Ready for iOS 12 and Xcode 10 appeared first on Xamarin Blog.

Handling input from Apple Pencil

After months of contemplation before finally buying an Apple Pencil to go along with the iPad Pro, it turns out it is as magical as they say! This blog post describes how to use Xamarin.iOS and Visual Studio 2017 to build a signature pad app that works with Apple Pencil.

Testing the Apple Pencil Input

While it is possible to use the iOS Simulator to test Apple Pencil input, it’s always best to test on a physical device. There – now you have a reason to upgrade! Start by creating a Single View App in Visual Studio 2017. Open Main.storyboard and drag an Image View to the design surface:

new project

Add New UIImageView

To add a new UIImageView outlet to (filename):

  • Set the Name of the image view to signaturePad
  • Check Enable User Interaction
  • Set the Class to SignatureView
  • Press return.

iOS interprets Apple Pencil input as standard touch inputs but with additional properties, to support writing, add code to handle the touch events:

public override void TouchesMoved(NSSet touches, UIEvent evt)
{
    // 1
    var touch = touches.ToArray().FirstOrDefault();
    if (touch == null)
        return;

    // 2
    UIGraphics.BeginImageContextWithOptions(Bounds.Size, false, 0);
    var context = UIGraphics.GetCurrentContext();
    Image?.Draw(Bounds);

    DrawLine(context, touch);
    Image = UIGraphics.GetImageFromCurrentImageContext();

    //3
    UIGraphics.EndImageContext();
}

This code does the following things:

  1. Gets the touch information from the event; this will be used to draw the line.
  2. Creates a Core Graphics image context that draws the lines on the screen by calling DrawLine method.
  3. Close the context.

The DrawLine methods processes the touch information:

UIColor color = UIColor.Blue;
nfloat width = 4;
nfloat force = 4;

...

void DrawLine(CGContext context, UITouch touch)
{
    //1
    var previousLocation = touch.PreviousLocationInView(this);
    var location = touch.LocationInView(this);

    //2
    context.SetStrokeColor(color.CGColor);
    context.SetLineWidth(width);
    context.SetLineCap(CGLineCap.Round);

    //3
    context.MoveTo(previousLocation.X, previousLocation.Y);
    context.AddLineToPoint(location.X, location.Y);

    //4
    context.StrokePath();
}

This code:

  1. Determines where to draw a line by looking at the previous and current touch locations.
  2. Sets the line properties.
  3. Creates a path.
  4. Draws the line by creating a stroke along the path.

Using the Apple Pencil

At this point, the app is ready to use Apple Pencil. The iPad’s palm rejection prevents your palm from interfering with the writing:

finger input

However, the line’s thickness is uniform no matter the force applied when writing. To draw a thicker line when the user applies greater pressure, use the Force property on the DrawLine method’s touch parameter:

//2
context.SetStrokeColor(color.CGColor);
width = touch.Force > 0 ? touch.Force * force : force;
context.SetLineWidth(width);
context.SetLineCap(CGLineCap.Round);

for_input

Much better now!

If you look at lines closely, you will see that the writing appears slightly notched and has sharp edges and points. This can happen when the Apple Pencil moves quickly on the surface and some of the touch events are lost.

To smooth out the lines, use coalesced touches in TouchesMoved:

// 2
UIGraphics.BeginImageContextWithOptions(Bounds.Size, false, 0);
var context = UIGraphics.GetCurrentContext();
Image?.Draw(Bounds);
foreach (var t in evt?.GetCoalescedTouches(touch))
{
    DrawLine(context, t);
}
Image = UIGraphics.GetImageFromCurrentImageContext();

With this change, the writing looks smooth:

smooth

Wrapping up

It is possible to use UITouch.AltitudeAngle and UITouch.GetAzimuthAngle(View) to further refine the writing. Check out Xamarin’s UITouch documentation and download the complete sample application from Github.

Discuss this post on the Xamarin forums.

The post Handling input from Apple Pencil appeared first on Xamarin Blog.

Access the world’s largest marketplace of motion assets

Rokoko’s Motion Library provides Unity users the ability to preview character animations and purchase with just a few clicks without leaving the editor. Visit the Asset Store today to download this plugin! What is the Motion Library? The Motion Library is an extensive motion asset marketplace that gives you access to AAA-quality character animation natively […]

September 18

Real-Time 3D for Auto – From CAD to Unity

In August, we had our first webinar for automotive, allowing audiences to see how PiXYZ’s best-in-class CAD-import solution and Unity’s real-time rendering platform can quickly bring great ideas and products to life. It was hosted by several industry experts, including Unity’s own Ed Martin and Adam Myhill, along with our partner from PiXYZ, Axel Jacquet. […]

September 17

Xamarin.Forms 3.2.0 Released: Going Big with Little Things

Xamarin.Forms 3.2.0 continues the theme of previous releases to give you big wins by making little things much easier to do. The entire version 3 series has been about reducing the friction of doing such things as positioning the Android tabs to the bottom, controlling spellcheck and capitalization and prediction on text controls. There are even trivial improvements to setting ImeOptions, coloring various elements of switches and bars, and so many more.

Released to NuGet today, Xamarin.Forms 3.2.0 kicks off another round with the highly requested TitleView. This allows you to put any content you wish into the NavigationBar’s title space. Let’s take a look at that new capability and several other enhancements that you’ll want to start using immediately. Much of this work is the result of close collaboration with you, the awesome Xamarin.Forms community!

Release Highlights

Customize the TitleView

Often, you may have asked something like, “How do I add my logo to the top bar?” or “How do I insert multiple lines of text into a title?”. Up till now, the answer has been “with a custom renderer”. That’s one of the beautiful things about Xamarin.Forms: you can always extend the controls on any of the platforms. Now the answer is even more simple in 3.2.0. Using TitleView you don’t have to dive into your native projects at all.

TitleView is part of the NavigationPage, which displays the title of the ContentPage  it manages. From your ContentPage you’ll access this and place whatever content you wish within a view:

<ContentPage>
    <NavigationPage.TitleView>
        <StackLayout Orientation="Horizontal" VerticalOptions="Center" Spacing="10">
            <Image Source="iconXamagon.png">
                <Image.GestureRecognizers>
                    <Image.TapGestureRecognizer
                        Tapped="HandleTapped" />
                </Image.GestureRecognizers>
            </Image>
            <Label Text="3.2.0" FontSize="16" TextColor="Black" VerticalTextAlignment="Center" />
        </StackLayout>
    </NavigationPage.TitleView>
    ...
</ContentPage>

Some specific things to note:

  • You can place interactive content to handle gestures.
  • Content will only acquire the space necessary to display itself and will not take over the entire bar.
  • The height of the bar will clip taller content. On Android you may use a platform specific to adjust the height, however iOS does not allow this.
  • Navigation elements such as ToolBarItems may conflict with the TitleView content or adjust the positioning to avoid collision.

Span Gestures

Reducing the number of labels used in your application by using formatted text is a great way to improve the performance of your UI. Now you can make use of gestures to make bits of text interactive within the larger text block. This is perfect for phone numbers, web addresses, mapped locations, and any number of other things you can imagine.

<Label>
    <Label.FormattedText>
        <FormattedString>
            <Span Text="Sometimes you want a span to be tappable, like a phone number or URL: " />
            <Span Text="{Binding Url, Mode=OneWay}" TextColor="Blue">
                <Span.GestureRecognizers>
                        <TapGestureRecognizer 
                            Command="{Binding TapCommand, Mode=OneWay}"
                            CommandParameter="https://www.xamarin.com"/>
                </Span.GestureRecognizers>
            </Span>
            <Span Text=". Tap it to launch a browser."/>
        </FormattedString>
    </Label.FormattedText>
</Label>

You may use commands with or without parameters, or just the tapped event. Combined with the bindings work introduced in 3.1.0, spans have become very useful. So easy!

Button Padding

To get your buttons looking just right, all you need is the ability to tweak the padding around the text. This is now as simple as setting the new Padding property on Button.

<Button Text="Pad Me" 
    FlexLayout.AlignSelf="Center"
    Padding="60,40"
    BackgroundColor="Black" 
    TextColor="White"/>

Editor Placeholder Color

The designer you work with has handed you a beautiful, functional design with great colors. It is now up to you to make it happen. Then you notice the text fields don’t use the standard grey placeholder color – No!

Not to worry, you can now easily set the color with the addition of the PlaceholderColor property. No sweat.

<Editor Placeholder="Leave your comments here"
        PlaceholderColor="Purple" />

These really are the little things that make a big difference!

New OnPlatform/OnIdiom XAML Extension

Xamarin.Forms uses these convenient methods to customize your UI and app behavior for the different platforms and devices you target. Typically in XAML this looks like:

<Button Text="Extensions" BackgroundColor="Black" TextColor="White">
    <Button.HeightRequest>
         <OnPlatform x:TypeArguments="x:Double" Default="40">
            <On Platform="iOS" Value="60"/>
            <On Platform="Android" Value="80"/>
        </OnPlatform>
    </Button.HeightRequest>
</Button>

That can be a bit much to type, over and over again. With this new extension, the same code can become:

<Button Text="Extensions" BackgroundColor="Black" TextColor="White" 
        HeightRequest="{OnPlatform iOS=60, Android=80, Default=40}"/>

Both variations work, so it’s up to you. This syntax also supports type converters and arguments.

Get Started Today!

This is the tip of the iceberg for all the great improvements in 3.2.0. Be sure to look into the new SwipeGesture, additional CSS properties, binding updates, and all the great bug fixes. Check the full release notes for the details, and definitely explore the documentation.

The update is now available on NuGet and via your Visual Studio package manager.

NuGet: https://www.nuget.org/packages/Xamarin.Forms/
The Little Things Playground Sample: https://github.com/davidortinau/TheLittleThingsPlayground

Find an issue?

Please report it to use on GitHub: https://github.com/xamarin/Xamarin.Forms/issues/new

To see what we are working on now, explore our sprint project boards on GitHub.

For what comes next, visit the Xamarin.Forms Feature Roadmap

Discuss this post in the forums

The post Xamarin.Forms 3.2.0 Released: Going Big with Little Things appeared first on Xamarin Blog.

WebAssembly Load Times and Performance

A few weeks ago we talked about WebAssembly and its advantages over asm.js. As promised, now it’s time to look at the performance and load times of Unity WebGL in four major browsers. It’s been a long time since we ran the Unity WebGL benchmark and published our findings. During this time, both Unity and […]

September 14

Unity Hub v1.0 is now available!

The Unity Hub is here and ready for public release! We are thankful for the great community engagement which resulted in a quick and successful beta cycle. As a quick recap, the Unity Hub is a connected desktop app designed to streamline onboarding and production processes for all users. It’s the central place for accessing […]

September 13

Unity 2018.3 beta: Get early access now

In July, we launched Unity 2018.2, which improved the performance of both the Lightweight Render Pipeline (LWRP) and the High Definition Render Pipeline (HDRP) to help you achieve high-end visual quality. The release also included multiple improvements to the Shader Graph, which now supports both pipelines, as well as several new features for mobile, 2D […]

September 12

Multiplayer Connected Games: First steps forward

As part of our commitment to solving challenges for connected games development, we’ve focused first on real-time multiplayer games, and we’ve learned a lot from our prior attempts to democratize this space. First and foremost, we know that in order to build the right new technology, we need your feedback every step of the way. […]

Monologue

Monologue is a window into the world, work, and lives of the community members and developers that make up the Mono Project, which is a free cross-platform development environment used primarily on Linux.

If you would rather follow Monologue using a newsreader, we provide the following feed:

RSS 2.0 Feed

Monologue is powered by Mono and the Monologue software.

Bloggers