Author Topic: TNet compilation errors on new install  (Read 2501 times)

outerringz

  • Guest
TNet compilation errors on new install
« on: May 28, 2013, 09:47:06 PM »
I'm running Unity 4.1.3f3 and TNet version 1.7.0 on Windows 7, and I have Unity Pro/Android Pro. This is an Android project, I thought that might be part of the problem since the guide mentions setting the [Run In Background] setting which isn't available for Android, so I recompiled as a Windows project, but that didn't alleviate the problem.

I imported TNet into my Unity project, and I'm getting three compilation errors:

Quote
Assets/TNet/Client/TNAutoSync.cs(199,10): error CS0616: `TNet.RFC': is not an attribute class

Assets/TNet/Client/TNAutoSync.cs(199,10): error CS0246: The type or namespace name `RFCAttribute' could not be found. Are you missing a using directive or an assembly reference?

Assets/TNet/Client/TNRFC.cs(14,2): error CS0641: Attribute `System.AttributeUsageAttribute' is only valid on classes derived from System.Attribute

I'm new to TNet so I was following the getting started guide, but I can't get to the first setup of copying the TNManager script to an empty because of the compilation errors.

Thanks for any help anyone can offer.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet compilation errors on new install
« Reply #1 on: May 28, 2013, 09:48:59 PM »
Are you sure you imported it in its entirety?

Assets/TNet/Client/TNRFC.cs has the RFC class, for example.

outerringz

  • Guest
Re: TNet compilation errors on new install
« Reply #2 on: May 28, 2013, 10:10:50 PM »
I confirmed the TNRFC class is there, I also downloaded the package again, deleted TNet and re-imported it just to make sure the download was good, but the errors are still there.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet compilation errors on new install
« Reply #3 on: May 28, 2013, 10:12:02 PM »
My guess is that you have your own class named "Attribute" which hides System.Attribute.

outerringz

  • Guest
Re: TNet compilation errors on new install
« Reply #4 on: May 28, 2013, 10:51:36 PM »
That was it, thank you!

Sorry, I should have caught that one.