0
votes

I'm trying to build my app targeting UWP 10 (D3D) but I got an error when I try to build the package, but it works fine inside the editor.

This is the code:

using UnityEngine;
using System.Collections;
using System;
using UIWidgets;

namespace Samples {

    [Serializable]
    public class MatchItem : IItemHeight
    {
        public float Height {
            get; set;
        }

        [SerializeField]
        public string GameName;

        [SerializeField]
        public string GameType;

        [SerializeField]
        public bool Private;

        [SerializeField]
        public int Ratings;

        public HostData HostData;
    }
}

error CS0246: The type or namespace name 'HostData' could not be found (are you missing a using directive or an assembly reference?)

HostData is inside the UnityEngine namespace, and I put it in the top of the file. The same code works for PC Standalone and Android.

I'm using the Unity version: 5.5.1f1 (64bit)

1

1 Answers

0
votes

I found the answer :) HostData is a "legacy" networking class, and it isn't supported over UAP.

Here the reference: https://docs.unity3d.com/Manual/windowsstore-gettingstarted.html

Things that are not yet supported:

- Legacy Network classes (please use current Unity Networking), WWW and UnityWebRequest are supported

So, only the UNET functionalities can be used for building as UAP.

^_^