Search found 45 matches

by Whiskey
27 May 2011, 11:07
Forum: SFS2X C# API
Topic: NonSerialized Attribute for SerializableSFSType
Replies: 1
Views: 1687

NonSerialized Attribute for SerializableSFSType

The .NET framework offers a [NonSerialized] attribute that indicates that a field should not be serialized. Is there something similar for the SerializableSFSType ? In addition, I tried to serialize a class MailBag that contains a list Envelopes of a custom class. The custom class in called Envelope...
by Whiskey
27 May 2011, 09:51
Forum: SFS2X Questions
Topic: question for coding server
Replies: 1
Views: 1281

If you're working with extensions, just enable auto reloading (enabled by default) and any new jar's you put in the extension directory will be automatically reloaded. You don't need a server restart. If you're putting jar's in __lib__, then you do need to restart the server after you deploy a new v...
by Whiskey
26 May 2011, 14:14
Forum: SFS2X C# API
Topic: Sending/receiving classes
Replies: 18
Views: 25596

I would love to see that as well. After some testing, I found with GetDump of the object to send that after PutClass both Unity (before sending), and the server (after receiving and before sending back) report the contents of the object as: (class) test: nl.inthere.sfs2x.serialization.TestOb...
by Whiskey
26 May 2011, 12:07
Forum: SFS2X C# API
Topic: Sending/receiving classes example
Replies: 6
Views: 5208

Based on Thomas' sticky and the comments from Lightnet I finally was able to serialize a class and send it to the server. I'll put my steps here to help any other beginners. Also, this example is very basic and does not require the rpg sample, which might make it a bit easier to follow. On a final n...
by Whiskey
25 May 2011, 11:12
Forum: SFS2X C# API
Topic: Sending/receiving classes
Replies: 18
Views: 25596

Thanks! One question: what about GetJavaPackageName ? I got the suggestion that that is needed client side so that serverside the class definition (that needs to be put in __lib__) can be located. I haven't been able to analyze much today because I'm not at the office, but it seems that will solve m...
by Whiskey
25 May 2011, 08:34
Forum: SFS2X Questions
Topic: Class in __lib__ not found
Replies: 3
Views: 1990

To wrap up this thread nicely, Lightnet solved my mystery by pointing this out:
Lightnet wrote:It took a while, you need package path of model base on the file.cs.

public string GetJavaPackageName ()
{
return "package";
}

So this function provides the name that is used to locate the class.
by Whiskey
25 May 2011, 08:29
Forum: SFS2X C# API
Topic: Sending/receiving classes example
Replies: 6
Views: 5208

Thanks! That seemed to do the trick. I'm still getting a java.lang.NoClassDefFoundError, but as I don't have access to my Eclipse environment today I'll look into that tomorrow. I'm not quite sure in what state I left it ;-) Now I know why I needed to include that function. Just never thought to put...
by Whiskey
24 May 2011, 17:10
Forum: SFS2X Questions
Topic: Beginner question on design of an extension
Replies: 1
Views: 1218

Beginner question on design of an extension

I'm mostly new to the serverside extensions and I'm trying to build my first one from scratch. The tutorials (video and documentation) are truly excellent, thanks for that! I'm now working on a scenario that involves temporarily storing data which is touched upon by the documentation, but not very c...
by Whiskey
24 May 2011, 16:58
Forum: SFS2X Questions
Topic: Class in __lib__ not found
Replies: 3
Views: 1990

Thanks, I'll go over it again and see if I missed anything. Good to know I won't get any clues from the log for this.
by Whiskey
24 May 2011, 10:05
Forum: SFS2X C# API
Topic: Sending/receiving classes
Replies: 18
Views: 25596

Awesome!
by Whiskey
24 May 2011, 08:48
Forum: SFS2X Questions
Topic: Class in __lib__ not found
Replies: 3
Views: 1990

Class in __lib__ not found

I'm trying to get class serialization to work with the Unity client, for which I created this thread in the Unity forum. While I do not want to cross post, I'm running into an issue which I think is more server side related. I created a serializable class with an interface and deployed that in __lib...
by Whiskey
24 May 2011, 08:30
Forum: SFS2X C# API
Topic: Sending/receiving classes example
Replies: 6
Views: 5208

Since the example makes use of interfaces I thought I would give that a shot. I created an interface both on the client and server side, but no luck. Still the class not found error. Even with my limited Java knowledge I'm beginning to wonder if anybody has this concept working with the Unity client...
by Whiskey
20 May 2011, 14:25
Forum: SFS2X C# API
Topic: Sending/receiving classes example
Replies: 6
Views: 5208

I had a closer look and concluded I did not read the instructions carefully. At the bottom of the Class serialization documentation is mentioned: In order to avoid this problem we need to make sure that the model classes are deployed in the extensions/__lib__/ folder. So for this example we have pre...
by Whiskey
16 May 2011, 18:08
Forum: SFS2X C# API
Topic: How to use user variables
Replies: 13
Views: 10810

I tried your retrieval code with some variables I had already set myself and it seems to be working for me. However, I notice that you are not using the same smartfox client object in the different pieces of code that you list. You are using "smartFoxClient.Send" and "smartFoxClient.M...
by Whiskey
16 May 2011, 07:48
Forum: SFS2X C# API
Topic: Sending/receiving classes example
Replies: 6
Views: 5208

Sending/receiving classes example

I'm trying to get class serialization to work between Unity and SFS, but I"m missing something. I read Thomas' sticky , but it is a bit too concise for me. I was wondering if anybody has this setup working and would care to post the code or explain what extra steps were taken in addition to the...

Go to advanced search