Downloaded the latest git repo and getting the following compile errors in the Detonation.cs file
Assets/DISUnity/PDU/Warfare/Detonation.cs(317,21): error CS0103: The name DTI' does not exist in the current context
Assets/DISUnity/PDU/Warfare/Detonation.cs(334,38): error CS0103: The nameExpendableDescriptor' does not exist in the current context
Assets/DISUnity/PDU/Warfare/Detonation.cs(337,42): error CS0246: The type or namespace name `ExpendableDescriptor' could not be found. Are you missing a using directive or an assembly reference?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What OS are you developing on and what is your build target?
It looks like this is an issue with Mono, I am using Windows so the MS .Net libraries have some features Mono does not, subnet masks seems to be one of them: https://bugzilla.xamarin.com/show_bug.cgi?id=2033
I will look for a workaround, for now the latest patch should fix your issues(it works on windows and mac for me) although you will still get the error about it being an invalid broadcasts address but you can ignore this for now.
Karl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I dont see any compile errors in Mono but the errors I previously posted show on the Unity console.
Is there a open source DIS player I can use to test Unity? I was looking for a DIS flight simulator but failed to find one.
I ran accross MAK Technologies, they have a VR-Link product for Unity that allows for HLA/DIS interoperability. They also make a DIS player/recorder. Licensing costs are high for that product.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Delta3d has some DIS elements, its been some time since I checked what they do though... http://www.delta3d.org/
I have been using MAK products for several years, they are good solid products but they are quite costly when you compare them to Unity, they also have a per seat licencing model which can be quite tricky if your planning on deploying your app to a lot of users, the cost soon shoots up.
Does the error always occur or only at certains times, e.g when you try to edit a particular object in the inspector or when you click play etc?
If you try to clear the error in the console does it go?
If you play does the connection class work, can you see entities appearing?
K
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok I have pushed a fix. It will now say the address is valid if it gets a NotImplementedException. This will at least get rid of the annoying messages, you will just have to make sure you use a valid address. I will look for a more permanent solution in the future.
Karl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So when I run the scene on my OSX Unity 3D I do not see the list of Available Multicast addresses but when I tried on my Windows Unity 3D, I was able to see the list of multicast addresses 224.0.0.1, 224.0.0.252, 225.0.0.222, 232.44.44.233
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like it could be the same problem, mono libraries vs MS .Net.
I dont have access to a mac at the moment but will tomorrow so I will try it then.
I use this to get the Multicast addresses:
foreach( NetworkInterface adapter in NetworkInterface.GetAllNetworkInterfaces() )
{
foreach( MulticastIPAddressInformation mctIPAddressInformation in adapter.GetIPProperties().MulticastAddresses )
{
So it could be that your mac does not have any multicast addresses(unlikely) or the mono libs dont have this feature working. You should still be able to use multicast it just means that you wont be able to detect the possible addresses. I will add a field in so you can manually type multicast addresses as well as select from the list.
k
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
NullReferenceException: Object reference not set to an instance of an object
DISUnity.Network.Connection.IsValidBroadcastAddress (System.String address) (at Assets/DISUnity/Network/Connection.cs:537)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:157)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUI.cs:1283)
ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:511)
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:206)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:233)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:225)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:154)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUI.cs:1283)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can't move the globe still, but i'm making progress, i'm seeing the following logs:
Discovered new entity: Name -
UnityEngine.Debug:Log(Object)
DISUnity.Simulation.Managers.EntityManager:OnEntityState(EntityState) (at Assets/DISUnity/Simulation/Managers/EntityManager.cs:302)
DISUnity.Events.EventMessenger`1:Broadcast(EventType, EntityState) (at Assets/DISUnity/Events/EventMessenger.cs:164)
DISUnity.Network.DecodeFactory:Decode(Byte[]) (at Assets/DISUnity/Network/DecodeFactory.cs:98)
DISUnity.Network.Connection:CheckForData() (at Assets/DISUnity/Network/Connection.cs:357)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's good, the scene doesn't have a camera controller in it at the moment so you cant move the globe. The orbit camera unity comes with is a pretty good one to use.
Are you planning on using the globe or do you have your own terrain?
The globe texture is stretched at the poles at the moment, I need to fix this.
Karl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Karl-
What would be the fastest way to automate populating the Entity Manager if you have a text file that lists for each entity the DIS enumeration as well as the directory for the collada model? Should I create a phython script?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Python in Unity? You can add your mappings in code, the EntityTypeMap is still very loosely developed at the moment so it may change in the future, I recently commented out 2 important functions. The Load and ReadFromXML functions read the SISO XML Enum document to create the initial map, although if you are populating it from a list then this is not really an issue for you.
If you want to add a mapping in code you would do something like this:
EntityTypeMap ourMap;//Get reference or create a new one.
int[] types = new int[] { ( int )typ.Kind,
( int )typ.Domain,
( int )typ.Country,
typ.Category,
typ.SubCategory,
typ.Specific,
typ.Extra };
Node current = ourMap.Root;
foreach( int val in types )
{
// See if a node already exists
Node n = current.Children.Find( o => o.Value == val );
if( n == null )
{
// Create a new one for this value
n = new Node
current.Children.add( n );
}
current = n;
}
GameObject ourEntity = new GameObject(); // You could add a monobehaviour here that has the file path stored in it
current.Obj = ourEntity;
This should give you what you need.
I will try to add a function to do it for you in the future.
Regards
Karl
Last edit: Karl Jones 2013-06-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Downloaded the latest git repo and getting the following compile errors in the Detonation.cs file
Assets/DISUnity/PDU/Warfare/Detonation.cs(317,21): error CS0103: The name
DTI' does not exist in the current context Assets/DISUnity/PDU/Warfare/Detonation.cs(334,38): error CS0103: The name
ExpendableDescriptor' does not exist in the current contextAssets/DISUnity/PDU/Warfare/Detonation.cs(337,42): error CS0246: The type or namespace name `ExpendableDescriptor' could not be found. Are you missing a using directive or an assembly reference?
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi,
You need to define DIS_VERSION_7 in the build settings.
Click the menu option: "DISUnity/DIS Protocol Version/DIS 7" to have it done for you.
Regards
Karl
I have just pushed a git update that will also fix the issue, its caused by not having a DIS version set.
Last edit: Anonymous 2013-06-04
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
The latest git now shows the following errors:
"NotImplementedException:The requested feature is not implemented.
System.Net.NetworkInformation.LinuxUnicastIPAddressInformation.get_IPv4Mask()
ArgumentException: Getting control 5's position in a group with only 5 controls when doing Repaint
Aborting
also anything I type for the broadcast address I get a triangle saying "Invalid Broadcast Address"
Hi,
What OS are you developing on and what is your build target?
It looks like this is an issue with Mono, I am using Windows so the MS .Net libraries have some features Mono does not, subnet masks seems to be one of them:
https://bugzilla.xamarin.com/show_bug.cgi?id=2033
I will look for a workaround, for now the latest patch should fix your issues(it works on windows and mac for me) although you will still get the error about it being an invalid broadcasts address but you can ignore this for now.
Karl
Karl-
I am using Unity 4.1.3f3 on OSX 10.8.3
I dont see any compile errors in Mono but the errors I previously posted show on the Unity console.
Is there a open source DIS player I can use to test Unity? I was looking for a DIS flight simulator but failed to find one.
I ran accross MAK Technologies, they have a VR-Link product for Unity that allows for HLA/DIS interoperability. They also make a DIS player/recorder. Licensing costs are high for that product.
Hi,
DIS Map is good for showing entity locations:
https://sourceforge.net/projects/dismap/
My other library KDIS is good for checking the contents of PDU's, its a lot more mature than DISUnity. https://sourceforge.net/projects/kdis/
Delta3d has some DIS elements, its been some time since I checked what they do though...
http://www.delta3d.org/
I have been using MAK products for several years, they are good solid products but they are quite costly when you compare them to Unity, they also have a per seat licencing model which can be quite tricky if your planning on deploying your app to a lot of users, the cost soon shoots up.
Does the error always occur or only at certains times, e.g when you try to edit a particular object in the inspector or when you click play etc?
If you try to clear the error in the console does it go?
If you play does the connection class work, can you see entities appearing?
K
Before hitting play I clear the log, then hit play and the two errors that come up on the console are:
NotImplementedException: The requested feature is not implemented.
System.Net.NetworkInformation.LinuxUnicastIPAddressInformation.get_IPv4Mask ()
DISUnity.Network.Connection.IsValidBroadcastAddress (System.String address) (at Assets/DISUnity/Network/Connection.cs:535)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:157)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
and
ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext ()
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:154)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
I do see the globe with the DIS connection settings window, the broadcast address is red
Ah, I didn't test when playing.
Ok I have pushed a fix. It will now say the address is valid if it gets a NotImplementedException. This will at least get rid of the annoying messages, you will just have to make sure you use a valid address. I will look for a more permanent solution in the future.
Karl
So when I run the scene on my OSX Unity 3D I do not see the list of Available Multicast addresses but when I tried on my Windows Unity 3D, I was able to see the list of multicast addresses 224.0.0.1, 224.0.0.252, 225.0.0.222, 232.44.44.233
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Looks like it could be the same problem, mono libraries vs MS .Net.
I dont have access to a mac at the moment but will tomorrow so I will try it then.
I use this to get the Multicast addresses:
foreach( NetworkInterface adapter in NetworkInterface.GetAllNetworkInterfaces() )
{
foreach( MulticastIPAddressInformation mctIPAddressInformation in adapter.GetIPProperties().MulticastAddresses )
{
So it could be that your mac does not have any multicast addresses(unlikely) or the mono libs dont have this feature working. You should still be able to use multicast it just means that you wont be able to detect the possible addresses. I will add a field in so you can manually type multicast addresses as well as select from the list.
k
How can I temporarily add a multicast address?
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
NullReferenceException: Object reference not set to an instance of an object
DISUnity.Network.Connection.IsValidBroadcastAddress (System.String address) (at Assets/DISUnity/Network/Connection.cs:537)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:157)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUI.cs:1283)
ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:511)
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:206)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:233)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:225)
DISUnity.UI.ConnectionEditor.DrawWindowContents (Int32 id) (at Assets/DISUnity/UI/ConnectionEditor.cs:154)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUI.cs:1283)
You will need to add the multicast address in code.
Get a reference to the connection class and do:
myConnection.AddMulticastAddress( "address goes here" );
To get rid of the exceptions change line 542 of Connection.cs from
catch( NotImplementedException )
to
catch( Exception )
This will get rid of errors for the moment.
K
Can't move the globe still, but i'm making progress, i'm seeing the following logs:
Discovered new entity: Name -
UnityEngine.Debug:Log(Object)
DISUnity.Simulation.Managers.EntityManager:OnEntityState(EntityState) (at Assets/DISUnity/Simulation/Managers/EntityManager.cs:302)
DISUnity.Events.EventMessenger`1:Broadcast(EventType, EntityState) (at Assets/DISUnity/Events/EventMessenger.cs:164)
DISUnity.Network.DecodeFactory:Decode(Byte[]) (at Assets/DISUnity/Network/DecodeFactory.cs:98)
DISUnity.Network.Connection:CheckForData() (at Assets/DISUnity/Network/Connection.cs:357)
That's good, the scene doesn't have a camera controller in it at the moment so you cant move the globe. The orbit camera unity comes with is a pretty good one to use.
Are you planning on using the globe or do you have your own terrain?
The globe texture is stretched at the poles at the moment, I need to fix this.
Karl
I was able to see grey sphere entities on both the Windows and OSX version of Unity.
Yeah it looks like all the errors are just for the GUI elements where I try to validate addresses, the actual sending and receiving data is fine :)
K
Karl-
What would be the fastest way to automate populating the Entity Manager if you have a text file that lists for each entity the DIS enumeration as well as the directory for the collada model? Should I create a phython script?
Hi Donu,
Python in Unity? You can add your mappings in code, the EntityTypeMap is still very loosely developed at the moment so it may change in the future, I recently commented out 2 important functions. The Load and ReadFromXML functions read the SISO XML Enum document to create the initial map, although if you are populating it from a list then this is not really an issue for you.
If you want to add a mapping in code you would do something like this:
This should give you what you need.
I will try to add a function to do it for you in the future.
Regards
Karl
Last edit: Karl Jones 2013-06-24