'deadBodyTokens' is missing the class attribute 'ExtensionOfNativeClass'! IProtocolToken

Options
255p
255p
edited February 2019 in Photon Bolt
I asked the question before, but i don't find any, to solve the problem and i can't turn my version back to 2018.2.

This is the follow little script, which makes the error :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class deadBodyTokens : Bolt.IProtocolToken
{
public int Gore_ID;


public void Write(UdpKit.UdpPacket packet)
{

packet.WriteInt(Gore_ID);

}
public void Read(UdpKit.UdpPacket packet)
{
Gore_ID = packet.ReadInt();
}



}

much greetings :smile:

edit: if i drag the script onto my prefab, do i receive that " Can't add script to behaviour deadbodyToken. The script needs to derive from MonoBheaviour "

Best Answer

  • 255p
    255p
    Answer ✓
    Options
    I made the error, that i putted the script into the scene.

Answers

  • 255p
    255p
    Answer ✓
    Options
    I made the error, that i putted the script into the scene.