Search Unity

Cant import Sketchup level into Unity via PlayUp

Discussion in 'Asset Importing & Exporting' started by reset, Jul 25, 2010.

  1. reset

    reset

    Joined:
    May 22, 2009
    Posts:
    393
    I cant seem to do it.

    I am using the Free version of SU 7.1 - I have set up a location in PU for the level to be exported and when I direct Unity to it to via the PU package I get a "Cant find path" and the level comes in empty.

    Any ideas?

    thanks
    r
     
  2. afalk

    afalk

    Joined:
    Jun 21, 2010
    Posts:
    164
    Sure :)

    Perhaps seeing how I set things up can help - Playup is working well for me.

    1st off I am on Windows and My Unity projects are set up inside my <NAME>\Documents folder. Inside of the individual project's asset folder, I have my own folder created called "Raw Objects".

    When I create a asset in PlayUP I point the plugin to the Raw Objects folder within my current Unity project. Remember to make everything into Groups or Components, and NAME them :) Anyhow, I export from Sketchup (free ver 7 like yours) then jump over to Unity.

    In that Unity project I mentioned I have of course already added the PlayUP editor resources so inside Unity, I just have to run the import level via PlayUP and everything imports without a problem.

    Hope that's some help.
     
  3. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I have been having similar problems with Playup. I am able to export the level but when importing it to Unity the level is empty.

    This is what I have done:

    - I have named all my components
    - I have created a folder (name Playup) in my Unity project asset folder
    - I have installed playup for my Unity project and I have used Playup-Import level menu when importing the level
    => I get the message: Could not find the a part of the path. Also, it seems that only the first component will be imported into Unity.

    If you have any ideas what could be the problem, please let me know.

     
  4. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    You didn't have to create a /PlayUp directory in your /Assets folder. PlayUp would have done that for you if it didn't exist already.

    Did you point your PlayUp settings in SketchUp to the correct /Assets directory?

    If so, I would suggest searching your /Assets directory sub-directories for a file with the extension .LVL

    If it doesn't exist, it wasn't generated for some reason. Or it may have been generated in the wrong directory if you didn't point the SketchUp settings in the right place.
     
  5. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I was able to find the file with .LVL extension and I tried to import it (see the picture). After importing, I can see the level in hierarchy window, but no visible geometry imports into Unity.



    After importing:
     
  6. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I think the problem is that you have it nested under /Assets/PLAYUP/PlayUp. Although the SketchUp side exporter will export there, the Unity level importer is looking for the objects and level files in /Assets/PlayUp/Levels and /Assets/PlayUp/Objects.
     
  7. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Thanks for being patient with me. This is what I get when trying without nested folders.

     
  8. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    It's having problems loading a.dae ...

    Make a simple box in SketchUp, group it, name it, and export it. Let me know if that works. If it does, then there is something odd about your model that the exporter doesn't seem to like.
     
  9. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    In this test scene I have exported just 3 simple cubes with textures (component A, B, and C). It seems that only component A gets exported but there is no geometry. Do you have any idea how I could start solving this problem step by step? Also, when trying Export All Components and Groups- option in PlayUp plugin, nothing seems to happen.
     
  10. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I made a video showing the steps to export here:
    http://playuptools.com/videos/playup2unity.html

    If it generates A.DAE, it should generate something for B.DAE and C.DAE. Even if it fails it would still generate a blank file. Also, it would make reference to B and C in your LVL file. Are you sure you are pointing to the correct assets director from PlayUp preferences? Are you sure that A.DAE isn't the same A.DAE from the earlier test?
     
  11. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I created a new Unity project and I tried to export the whole thing again. Below you can see what I am trying to export. But, still only A.DAE gets imported into Unity (without geometry and the size of the file is 0kt). Therefore, I would assume that the problem is in Sketchup part of the exporting/importing process.

    Have you noticed any other plugins causing problems for PaluUp?



     
  12. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I have not run into any conflicts with other plugins yet. Very odd.

    Try this. Go to your /Resources/en-US/PlayUp/ directory. There is a file called _HL2_Source_Template.skp. Load that and try exporting it. It's the same exact file from the video demo.

    Also, when you export, run the Ruby Console in SketchUp and let me know if there are any error messages that pop up. That would be helpful.
     
  13. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Thanks again for the help.

    I decided to install PlayUp plugin to Sketchup again and now it seems to work much better. Now I get all the components exported. Anyway, I don't exactly get the results as in the video that you have provided. When importing to Unity I see the objects in Project window but only the man with machine gun gets imported into Hierarchy window. Also, orientation of the models are not correct. Is there some Unity settings that I should change?

     
  14. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Ok... I noticed from your Debug status bar in Unity that it's finding an unknown character in that LVL file.

    Open up _HL2_Source_Template.LVL in Notepad and tell me what you see. It should look like this:

    Code (csharp):
    1. <?xml version="1.0" ?>
    2. <LEVELSETTINGS>
    3.     <ENTITIES>
    4.         <OBJECT NAME="_dev_tf2_Heavy" POSITION="35.0052228940387, -0.000659924966102565, 1.51909806270505" ROTATION="0.0, 0.0, -1.0, -8.34589885536176" SCALE="1.00000000000003, 1.00000000000003, 1.0" />
    5.         <OBJECT NAME="_dev_Source_Stairs_8x12" POSITION="416, 128.000000000018, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    6.         <OBJECT NAME="_dev_Source_door_56x112" POSITION="456.0, 512.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    7.         <OBJECT NAME="_dev_Source_crate_32x32" POSITION="424, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    8.         <OBJECT NAME="_dev_Source_Crate_48x48" POSITION="376, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    9.         <OBJECT NAME="_dev_Source_Crate_64x64" POSITION="312, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    10.         <OBJECT NAME="Legend" POSITION="0.0, 0.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    11.         <OBJECT NAME="_dev_Source_barrel_32x48" POSITION="387.098044193201, 75.2935682060775, -6.31088724176809e-030" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    12.         <OBJECT NAME="_dev_Source_Counter_40x64" POSITION="448.0, 0.0, -2.43501347258945e-016" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    13.         <OBJECT NAME="_dev_Source_Table_30x64" POSITION="256.0, 0.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    14.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-16, 128.0, 32.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    15.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="-192.0, 128.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    16.         <OBJECT NAME="_dev_Source_Stairs_8x12#1" POSITION="-64, 127.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    17.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-64, 128.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    18.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="80, 128.0, 96.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    19.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="32, 128.0, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    20.         <OBJECT NAME="_dev_Source_Stairs_8x12#1" POSITION="31.9999999999999, 127.999999999995, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    21.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="128.0, 128.0, 128.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    22.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-16.0000000000021, 190.999999999995, 32.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    23.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="31.9999999999979, 190.999999999995, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    24.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="-192.000000000002, 190.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    25.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="79.9999999999979, 190.999999999995, 96.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    26.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="127.999999999998, 191, 128.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    27.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-64.0000000000021, 190.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    28.     </ENTITIES>
    29. </LEVELSETTINGS>

    Either the LVL file for some reason is not getting generated correctly, or the script files for PlayUp.unitypackage are doing something funky and might need to be reinstalled.
     
  15. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Here is what the _HL2_Source_Template.lvl-file looks in notepad:

    Code (csharp):
    1. <?xml version="1.0" ?>
    2. <LEVELSETTINGS>
    3.     <ENTITIES>
    4.         <OBJECT NAME="_dev_tf2_Heavy" POSITION="35.0052228940387, -0.000659924966102565, 1.51909806270505" ROTATION="0.0, -0.0, -1.0, -8.34589800158794" SCALE="1, 1, 1.0" />
    5.         <OBJECT NAME="_dev_Source_Stairs_8x12" POSITION="416, 128.000000000018, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    6.         <OBJECT NAME="_dev_Source_door_56x112" POSITION="456.0, 512.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    7.         <OBJECT NAME="_dev_Source_crate_32x32" POSITION="424, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    8.         <OBJECT NAME="_dev_Source_Crate_48x48" POSITION="376, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    9.         <OBJECT NAME="_dev_Source_Crate_64x64" POSITION="312, 480.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    10.         <OBJECT NAME="Legend" POSITION="0.0, 0.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    11.         <OBJECT NAME="_dev_Source_barrel_32x48" POSITION="387.098044193201, 75.2935682060775, -6.31088724176809e-030" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    12.         <OBJECT NAME="_dev_Source_Counter_40x64" POSITION="448.0, 0.0, -2.43501347258945e-016" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    13.         <OBJECT NAME="_dev_Source_Table_30x64" POSITION="256.0, 0.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    14.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-16, 128.0, 32.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    15.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="-192.0, 128.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    16.         <OBJECT NAME="_dev_Source_Stairs_8x12#1" POSITION="-64, 127.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    17.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-64, 128.0, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    18.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="80, 128.0, 96.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    19.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="32, 128.0, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    20.         <OBJECT NAME="_dev_Source_Stairs_8x12#1" POSITION="31.9999999999999, 127.999999999995, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    21.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="128.0, 128.0, 128.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    22.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-16.0000000000021, 190.999999999995, 32.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    23.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="31.9999999999979, 190.999999999995, 64.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    24.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="-192.000000000002, 190.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    25.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="79.9999999999979, 190.999999999995, 96.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    26.         <OBJECT NAME="_dev_Source_Railing_32x128" POSITION="127.999999999998, 191, 128.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    27.         <OBJECT NAME="_dev_Source_StairRailing_32x48" POSITION="-64.0000000000021, 190.999999999995, 0.0" ROTATION="1, 0, 0, 0" SCALE="1.0, 1.0, 1.0" />
    28.     </ENTITIES>
    29. </LEVELSETTINGS>
     
  16. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Odd...

    Code (csharp):
    1.  
    2. <OBJECT NAME="_dev_tf2_Heavy" POSITION="35.0052228940387, -0.000659924966102565, 1.51909806270505" ROTATION="0.0, -0.0, -1.0, -8.34589800158794" SCALE="1, 1, 1.0" />
    Change that line to say:

    Code (csharp):
    1. <OBJECT NAME="_dev_tf2_Heavy" POSITION="35.0052228940387, -0.000659924966102565, 1.51909806270505" ROTATION="0.0, -0.0, -1.0, -8.34589800158794" SCALE="1.0, 1.0, 1.0" />
    ...and try importing it.
     
  17. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I changed the piece of code but I don't see any difference. Only the OBJECT NAME="_dev_tf2_Heavy- model gets imported and the orientation is the same as earlier.
     
  18. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Actually... what might be messing this up for you is if you had an older version of the PlayUp Unity package and didn't update it with the new stuff in the latest build.

    I would try reinstalling that package. Also, the PlayUp Unity dropdown menu importer should work fine, but if it still doesn't work, try right-clicking on the LVL file in your project view and importing it that way (there should be an option on your right-click menu to import the PlayUp LVL file).
     
  19. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I just downloaded the latest version of PlayuUp (PlayUp Alpha ver. 0.9.3) and installed it to Sketchup. If I open the level-file and look at it with notepad, I can still see that there is SCALE="1,1,1.0" instead of SCALE="1.0,1.0,1.0".

    Also, I tried importing the level via right clicking the the level-file but I still get the same results.
     
  20. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    If you pull the "_dev_Source_Stairs_8x12.dae" file from your project window to your hierarchy, does it appear?
     
  21. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Yes, I get the models if I drag them from project window.
     
  22. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    You installed it to SketchUp... ok... did you remember to double click the playup.unitypackage file as well (the one that comes with 0.9.3)?

    If all of your models are in the project window and can be manually dragged to the scene, and judging from the level file you pasted... there is nothing wrong with what is getting exported from the PlayUp-SketchUp exporter plugin. What is wrong is how the PlayUp-Unity importer is reading that level file... which can only mean that you haven't installed the latest version playup.unitypackage.
     
  23. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I tried to install PlayuUp into Unity again, but I still get the same results. Below you can see the error that Unity gives: FormatException: Unknown char: .


     
  24. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    I'm stumped.

    Line 88 of the PlayUp.cs file is:

    Code (csharp):
    1. pos.x = float.Parse(vals[0]);
    This part of the code is part of the process that takes the string for the POSITION field in the XML file and parses it (delimited by comma), then takes the individual string values, converts them to floats, and puts it into a vector for position.

    Nothing too complex about it, and your level file seems to be in order. So I don't know why it is stumbling when trying to parse the first position value. What's even more odd is that you're the only one having this problem.

    Perhaps you should make sure that the PlayUp.cs file looks like this (just in case it somehow got corrupted during download, or overwritten, etc):

    Code (csharp):
    1. // PlayUp Tools - [url]www.playuptools.com[/url]
    2.  
    3. using UnityEngine;
    4. using UnityEditor;
    5. using System.Collections;
    6. using System.IO;
    7. using System.Text;
    8.  
    9. using System;
    10. using System.Xml;
    11.  
    12. public class PlayUp: EditorWindow {
    13.  
    14.     string myString = "";
    15.    
    16.     [MenuItem ("PlayUp/Import Level")]
    17.    
    18.     static void  Init () {
    19.         // Get existing open window or if none, make a new one:
    20.         PlayUp window = (PlayUp)EditorWindow.GetWindow (typeof (PlayUp));
    21.         window.Show ();
    22.     }
    23.    
    24.     void OnGUI  () {
    25.         Texture2D texty = Resources.LoadAssetAtPath("Assets/Editor PlayUp Resources/playup-logo-unity.png", typeof(Texture2D)) as Texture2D;
    26.         if (texty) GUI.DrawTexture(new Rect(20,0,227, 60), texty);  
    27.         GUI.BeginGroup (new  Rect (10, 70, 270, 200));
    28.        
    29.         GUILayout.BeginHorizontal (GUILayout.Width(200));
    30.         GUILayout.Space (50);
    31.         if(GUILayout.Button("www.playuptools.com", GUILayout.Width(170))) {
    32.             Application.OpenURL("http://www.playuptools.com");
    33.         }
    34.         GUILayout.EndHorizontal ();
    35.         GUILayout.Space (10);
    36.         if (myString != "") {
    37.             GUILayout.Label ("LEVEL SELECTED FOR IMPORT: ", EditorStyles.boldLabel);
    38.             GUILayout.Label (myString, EditorStyles.boldLabel);
    39.             GUILayout.Label ("");
    40.             GUILayout.Label ("Click on the Import button to load the level.");
    41.         }
    42.         else {
    43.             GUILayout.Label ("LEVEL SELECTED FOR IMPORT: ", EditorStyles.boldLabel);
    44.             GUILayout.Label ("none", EditorStyles.boldLabel);
    45.             GUILayout.Label ("");
    46.             GUILayout.Label ("Select a level file by clicking the Browse button.");
    47.         }
    48.         GUILayout.BeginHorizontal (GUILayout.Width(200));
    49.        if(GUILayout.Button("Browse", GUILayout.Width(100))) {
    50.            myString = Path.GetFileName(EditorUtility.OpenFilePanel("Choose the Level File", "Assets/PlayUp/Levels/", "lvl"));
    51.        }
    52.        if (myString != "") {
    53.            if(GUILayout.Button("Import", GUILayout.Width(100))) {
    54.                if (myString != "") FiletoObj(myString);
    55.                else Debug.Log("You have not yet selected a level file.  Please select a level file by clicking the Browse button.");
    56.            }
    57.         }
    58.     GUILayout.EndHorizontal ();
    59.         GUI.EndGroup ();
    60.     }
    61.    
    62.     public static void FiletoObj(string levelName)
    63.     {
    64.    
    65.         char[] delimiterChars = { ',' };
    66.         GameObject level = new GameObject(Path.GetFileNameWithoutExtension(levelName));
    67.        
    68.         //Create the XmlDocument.
    69.         XmlDocument doc = new XmlDocument();
    70.         string path = "Assets\\PlayUp\\Levels\\" + levelName;
    71.         FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
    72.         doc.Load(fs);
    73.         XmlNodeList node = doc.GetElementsByTagName("OBJECT");
    74.         for (int i=0; i<node.Count; i++)
    75.         {
    76.             GameObject prefab = null;
    77.             GameObject clone = null;
    78.             XmlAttributeCollection attrc = node[i].Attributes;
    79.             for (int j=0; j<attrc.Count; j++)
    80.             {
    81.                 if (attrc[j].Name == "NAME"){
    82.                     prefab = Resources.LoadAssetAtPath("Assets/PlayUp/Objects/" + attrc[j].Value + ".dae", typeof(GameObject)) as GameObject;
    83.                     clone = EditorUtility.InstantiatePrefab(prefab) as GameObject;
    84.                 }
    85.                 if (attrc[j].Name == "POSITION"){
    86.                     string[] vals = attrc[j].Value.Split(delimiterChars);
    87.                     Vector3 pos;
    88.                     pos.x = float.Parse(vals[0]);
    89.                     pos.z = float.Parse(vals[1]);
    90.                     pos.y = float.Parse(vals[2]);
    91.                     clone.transform.position = pos;
    92.                 }
    93.                 if (attrc[j].Name == "ROTATION"){
    94.                     string[] vals = attrc[j].Value.Split(delimiterChars);
    95.                     Vector3 rot;
    96.                     rot.x = float.Parse(vals[0])-90;
    97.                     rot.y = float.Parse(vals[1]);
    98.                     rot.z = float.Parse(vals[2])+180;
    99.                     clone.transform.eulerAngles = rot;
    100.                 }
    101.                 if (attrc[j].Name == "SCALE"){
    102.                     string[] vals = attrc[j].Value.Split(delimiterChars);
    103.                     Vector3 scale;
    104.                     scale.x = float.Parse(vals[0]);
    105.                     scale.y = float.Parse(vals[1]);
    106.                     scale.z = float.Parse(vals[2]);
    107.                     clone.transform.localScale = scale;
    108.                 }
    109.             }
    110.         clone.transform.parent = level.transform;
    111.         }      
    112.     }
    113. }
    Other than that, I really don't know what else it could be.
     
  25. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I tried to replace the PlayUp.cs- file but I still get the same results. Anyway, I can still do the importing ok with PlayUp for my needs. This is because I will need to import only individual objects not the whole level. Please let me know if you happen to find somebody else with similar problem when using PlayUp. Maybe we can then find out if this is a "user problem" or not.

    Anyway, thank you for all the help with this problem!
     
  26. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Sorry I couldn't help you get this up and running. Please do let me know if you figure out why it's not working for you. So far you're the only one with this problem, but I'll let you know if I run into another case.
     
  27. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    171
  28. nintari

    nintari

    Joined:
    Jul 7, 2009
    Posts:
    100
    Hm... very interesting. If that's the case, and Unity just wants to see a , instead of a . for the floats... then it may just be a matter of a simple adjustment for people with European machines.

    Unfortunately I do not have a machine setup to properly test it. If someone wants to try replacing the . for , in the lvl file and let me know if it returns favorable results, that would be helpful for the next release.
     
  29. TheLorax

    TheLorax

    Joined:
    Mar 25, 2007
    Posts:
    86
    What's the status on this for the Mac side? Really would like to use this.

    TheLorax
     
  30. unitychristy2

    unitychristy2

    Joined:
    Sep 8, 2013
    Posts:
    38
    This thread seems to have been quiet for 3 years. I thought I would update my experience.
    On the windows machine running Unity basic 4.2.1f4 with sketch up 8.0.16846 everything works as intended - once I had name the components and added entity info name to each component within sketch up. The import process also worked once I had imported the playup import package.
    So complete success when everything is done on windows. (Im trying to get the files importing correctly as there is no working mac sketchup exporter)
    (Also note the inclusion of silverlight at this moment doesn't aid in collision information being added within sketch up for unity)

    The Mac situation for importing;
    So within windows my plan is to create the sketchup models and import them out with play up then transfer them via usb to the mac machine (asset folder/playup) where I normally work.

    This throws this problem on the mac machine : File not found exception : Could not find file
    users/kevin/NetworkGame/Assets\Playup\Level\BuildingsScene.lvl (notice the direction of the slashes ?)

    So: - the solution Yeeeehaaaah!

    open up (on the mac and within your project)
    PlayupImport.cs in MonoDevelop and change line 22

    to this : string path = "Assets//PlayUp//Levels//" + levelName;

    you should now be able to import.
     
    Last edited: Oct 3, 2013