HoloLens (第 1 世代) と Azure 310: 物体検出のプログラムでエラーが発生する

Chan USSA 1 Reputation point
2022-06-29T12:49:44.653+00:00

HoloLens (第 1 世代) と Azure 310: 物体検出
https://learn.microsoft.com/ja-jp/windows/mixed-reality/develop/unity/tutorials/mr-azure-310
こちらを利用する際に画像のようなエラーが発生します。
何か解決方法はありますでしょうか?216099-%E8%B3%AA%E5%95%8F%E7%94%A8.png

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
390 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Seth DU - MSFT 541 Reputation points
    2022-06-30T06:03:55.487+00:00

    Hello, welcome to Microsoft Q&A,

    Please note that currently Q&A only provides English support for HoloLens development.

    According to the translator, your issue is that there are compile issues when following the tutorial on HoloLens (1st gen) and Azure 310: Object detection to create CustomVisionAnalyser class.

    The cause is that your script doesn’t derive from MonoBehaviour . MonoBehaviour is the base class for C# script use in Unity. Please double check the instruction on Chapter 5 - Create the CustomVisionAnalyser class, and follow the steps to create the CustomVisionAnalyser class. The proper structure for your script should be as below.

    using Newtonsoft.Json;  
    using System.Collections;  
    using System.IO;  
    using UnityEngine;  
    using UnityEngine.Networking;  
      
    public class CustomVisionAnalyser : MonoBehaviour  
    {  
      
        public static CustomVisionAnalyser Instance;  
      
        private string predictionKey = "- Insert your key here -";  
      
      
        private string predictionEndpoint = "Insert your prediction endpoint here";  
      
        [HideInInspector] public byte[] imageBytes;  
      
        void Start()  
        {  
              
        }  
      
        void Update()  
        {  
              
        }  
    }  
      
    

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments