Search Unity

Runtime Editor

Discussion in 'Assets and Asset Store' started by Vadim-Andriyanov, May 9, 2017.

  1. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
  2. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Following code could be used to import image to RuntimeEditor:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. using System.IO;
    4.  
    5. using Battlehub.RTSaveLoad;
    6.  
    7. public class ImportImgTest : MonoBehaviour
    8. {
    9.     private void Update ()
    10.     {
    11.         if(Input.GetKeyDown(KeyCode.P))
    12.         {
    13.             byte[] fileData;
    14.  
    15.             string filePath = Application.streamingAssetsPath + "/Test.jpg";
    16.             if (File.Exists(filePath))
    17.             {
    18.                 fileData = File.ReadAllBytes(filePath);
    19.                 Texture2D texture = new Texture2D(2, 2);
    20.                 texture.name = "Test";
    21.  
    22.                 if(texture.LoadImage(fileData))
    23.                 {
    24.                     IProjectManager pm = Dependencies.ProjectManager;
    25.                     pm.AddDynamicResource(pm.Project, texture, addItems =>
    26.                     {
    27.                         Debug.Log(addItems);
    28.                     });
    29.                 }
    30.             }
    31.         }
    32.     }
    33. }
    34.  
    Put Test.jpg to StreamingAssets folder

    upload_2017-8-5_10-19-49.png
     
  3. Holo-Denis

    Holo-Denis

    Joined:
    May 17, 2017
    Posts:
    3
    Thx for the Answer Vadim,

    I am aiming to use parts of your Editor for the HoloLens, if it works. For this i want to build for "Any Device" and activate "Virtual Reality Supported". With these Settings the Errors occur.

    In the long run, i want to try to use some sort of Editor for the HoloLens. Your Editor is the best, it would be awesome to use parts of it.
    Unity Error Editor.PNG
     
  4. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi Denis, It seems that I can build with absolutely same configuration as yours and have no errors.

    Which version of unity you are using?
    Which version of UWP SDK you have?
    Which os you are using?
    Are you able to compile following code in separate project without RuntimeEditor?

    Code (CSharp):
    1. using System;
    2. using System.Reflection;
    3. using System.Linq;
    4. using UnityEngine;
    5.  
    6. public class Test : MonoBehaviour {
    7.  
    8.     void Start()
    9.     {
    10.         Type type = GetType();
    11. #if !UNITY_WINRT || UNITY_EDITOR      
    12.         Type[] types = AppDomain.CurrentDomain.GetAssemblies()
    13.             .SelectMany(s => s.GetTypes())
    14.             .Where(p => p.IsClass).ToArray();
    15. #else
    16.         Type[] types = type.GetTypeInfo().Assembly.GetTypes().Where(p => p.GetTypeInfo().IsClass).ToArray();
    17. #endif
    18.     }
    19. }
    20.  
     
  5. NexusUnity

    NexusUnity

    Joined:
    Oct 24, 2016
    Posts:
    1
    Is this compatible with 2017.1.0f3? I've just bought and installed this asset, and i'm just getting strange errors and it's not matching what the documentation says to do.

    Thanks.
     
  6. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Not yet but I'm working on it,
    please send mail with your order number to Vadim.Andriyanov@outlook.com
    and I'll send you version which is not final but at least could be compiled with unity 2017,
    I'll also keep you updated with latest versions (several big issues will be fixed there)

    Regards,
    Vadim
     
  7. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    hi,@Vadim,will you plane add support modified material interface in your plugins ?
     
  8. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi,
    could you clarify it a little bit? Which modification are you talking about?
    Regards,
    Vadim
     
  9. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    @Vadim
    sorry,
    yes,you did.
    Material & ProceduralMaterial editors,can you upload some video guide ?
     
  10. Lesha-VH

    Lesha-VH

    Joined:
    Jul 3, 2012
    Posts:
    96
    where can I get source code for RTTypeModel.dll?

    how to remove objects from begin exposed for run-time editor -
    where can I find list of them?

    thanks!
     
    Last edited: Aug 23, 2017
  11. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    hi, @vidim,thank you for your great plugin I just paid ,for it .
    is that possible to create prefab in runtime editor use drag and drop such like unity ?
    and it's seem can not edit camera properties at inspector ,
    whart's your road map ?
     
  12. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    after update to 2017.1 version,that bug was fixed.

    here is my other question about

    what's the relationship between ProjectItem and UnityObject,
    how to Get UnityObject, from ProjectItem?
     

    Attached Files:

    Last edited: Sep 6, 2017
  13. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    It would seem useful to be able to edit the IDs. If an ID-prefab link became broken that could break RT scenes if you weren't able to restore the link. Is there a reason they are readonly?
     
    Last edited: Sep 16, 2017
  14. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi,
    you could edit ResourceMap identifiers manually
    Just comment out ReadOnly attribute of Id property in Assets\Battlehub\RTSaveLoad\Scripts\Implementation\ResourceGroup.cs
    Code (CSharp):
    1. using UnityEngine;
    2. using Battlehub.Utils;
    3.  
    4. namespace Battlehub.RTSaveLoad
    5. {
    6.     [System.Serializable]
    7.     public struct ObjectToID
    8.     {
    9.         [HideInInspector]
    10.         public string Name;
    11.         public Object Object;
    12.         //[ReadOnly]
    13.         public int Id;
    14.  
    15.         public ObjectToID(Object obj, int id)
    16.         {
    17.             Name = obj.name;
    18.             Object = obj;
    19.             Id = id;
    20.         }
    21.     }
    22.  
    23.     public class ResourceGroup : MonoBehaviour
    24.     {
    25.         [ReadOnly]
    26.         public string Guid;
    27.         public ObjectToID[] Mapping;
    28.     }
    29. }
    30.  
    upload_2017-9-18_11-32-37.png
     
  15. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    RTTypeModel.dll generated automatically using existing source code in your project by clicking Build Type Model menu item.

    upload_2017-9-18_11-35-0.png
    It contains serialization/deserialization code for all classes marked with [ProtoContract] attribute.
    It is required to support Protobuf.net serialization on platforms with AOT compilation
    https://docs.unity3d.com/Manual/ScriptingRestrictions.html

    To remove objects from being exposed for RTEditor following menu item could be used
    upload_2017-9-18_11-41-32.png
    Just select object you want to hide and click Hide From Editor

    Or you could remove them from ProjectTemplate directly
    upload_2017-9-18_11-42-53.png
     
  16. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    ProjectItem serves as representation of UnityEngine.Object in project tree. If UnityEngine.Object is GameObject then ProjectItem will contain data copied from this GameObject, it's children and all attached components.

    Here is how to get UnityObject from ProjectItem

    Code (CSharp):
    1. using Battlehub.RTCommon;
    2. using Battlehub.RTSaveLoad;
    3.  
    4.  
    5. ......
    6.  
    7. IProjectManager projectManager = Dependencies.ProjectManager;
    8. projectManager.GetOrCreateObjects (projectItem, pairs => {
    9.     foreach(ProjectItemObjectPair pair in pairs)
    10.     {
    11.         if(pair.IsSceneObject || pair.IsResource)
    12.         {
    13.             Debug.Log(pair.Object);
    14.         }
    15.     }
    16. });
     
  17. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    upload_2017-9-18_17-14-3.png

    how to add click event to call show Material editor panel when click Materials element0?
     
  18. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Go to Assets\Battlehub\RTEditor\Scripts\Editors\PropertyEditors\PropertyEditor.cs and modify Update method like this (make it virtual)

    protected virtual void Update()

    Then add following code to Assets\Battlehub\RTEditor\Scripts\Editors\PropertyEditors\ObjectEditor.cs

    Code (CSharp):
    1.  
    2.         private float m_prevClick;
    3.         protected override void Update()
    4.         {
    5.             base.Update();
    6.          
    7.             if(m_isPointerOver)
    8.             {
    9.                 if(UnityEngine.Input.GetMouseButtonDown(0))
    10.                 {
    11.                     if(Time.time - m_prevClick < 0.3)
    12.                     {
    13.                         SelectMaterial();
    14.                     }
    15.                     else
    16.                     {
    17.                         m_prevClick = Time.time;
    18.                     }
    19.                  
    20.                 }
    21.             }
    22.         }
    23.         private void SelectMaterial()
    24.         {
    25.             UnityObject value = GetValue();
    26.             if (value != null)
    27.             {
    28.                 RuntimeSelection.activeObject = value;
    29.             }
    30.         }
    Regards,
    Vadim
     
  19. max_coding13

    max_coding13

    Joined:
    Apr 24, 2016
    Posts:
    34
    Hello Vadim,
    I'm wondering, is it possible to output the editor window to another display? When I attempt this naively it seems to have many negative side effects. What would be the easiest method of achieving a system like this? I would eventually like to have the level editor open on one monitor, while the game camera is displaying on another, side by side. Is this possible?
    Thank you!
    Max
     
  20. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi Max,

    To do this:
    1) create new Camera and set it to Display2 -> this will be your game camera
    2) Copy RTHandlesDemoSmoothFollow script from MainCamera to Camera
    3) Remove RTHandlesDemoSoothFollow from MainCamera

    upload_2017-10-4_11-32-7.png

    4) Modify PrepareCameras method of RuntimeEditor.cs like this: (add c.targetDisplay == 0)

    Code (CSharp):
    1.  
    2.         private void PrepareCameras()
    3.         {
    4.             m_gameViewViewportFitter = GameView.GetComponentInChildren<ViewportFitter>();
    5.             RuntimeEditorApplication.GameCameras = FindObjectsOfType<Camera>()
    6.                 .Where(c => (Grid == null || c.gameObject != Grid.gameObject) &&
    7.                             (RuntimeEditorApplication.ActiveSceneCamera == null || c.gameObject != RuntimeEditorApplication.ActiveSceneCamera.gameObject) &&
    8.                             (SceneGizmo == null || c.gameObject != SceneGizmo.gameObject) &&
    9.                             c.targetDisplay == 0)
    5) Display 1
    upload_2017-10-4_11-40-32.png
    6) Display 2
    upload_2017-10-4_11-41-15.png

    Regards,
    Vadim
     
  21. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    So i need to be able to click on an object, but have it's parent be selected instead. for example, obj 2 is a child of obj 1. obj 2 has a mesh of a cube that is 2,2,2 in scale. I want to be able to click on the mesh of obj 2, but have the target of handles (transform, rotation and scale) be obj 1. Is that possible? I've read through most of the documentation but can't seen to find this, maybe i'm just missing it.

    Also i've experience an issue where in if the game is running for more than 2 minutes, the Runtime Editor Handles do not appear anymore when clicking on objects.
     
  22. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    HI, I assume you have ExposeToEditor script attached to obj1. At the same time ExposeToEditor script is not attached to obj2.

    upload_2017-10-12_11-28-24.png

    upload_2017-10-12_11-28-1.png

    To select obj1 by clicking obj2 modify LateUpdate method in Assets\Battlehub\RTHandles\Scripts\RuntimeSelectionComponent.cs

    This line of code will do the job
    ExposeToEditor exposed = hitInfo.collider.gameObject.GetComponentInParent<ExposeToEditor>();

    Code (CSharp):
    1.    private void LateUpdate()
    2.         {
    3.             if (Input.GetMouseButtonDown(0))
    4.             {
    5.                 if(RuntimeTools.ActiveTool != null && RuntimeTools.ActiveTool != BoxSelection.Current)
    6.                 {
    7.                     return;
    8.                 }
    9.            
    10.                 if (!IPointerOverEditorArea)
    11.                 {
    12.                     return;
    13.                 }
    14.  
    15.                 if (RuntimeTools.IsViewing)
    16.                 {
    17.                     return;
    18.                 }
    19.      
    20.                 bool rangeSelect = InputController.GetKey(RangeSelectKey);
    21.                 bool multiselect = InputController.GetKey(MultiselectKey) || InputController.GetKey(MultiselectKey2) || rangeSelect;
    22.                 Ray ray = SceneCamera.ScreenPointToRay(Input.mousePosition);
    23.                 RaycastHit hitInfo;
    24.  
    25.                 if (Physics.Raycast(ray, out hitInfo, float.MaxValue))
    26.                 {
    27.                     ExposeToEditor exposed = hitInfo.collider.gameObject.GetComponentInParent<ExposeToEditor>();
    28.  
    29.                     if (exposed != null && CanSelect(exposed.gameObject))
    30.                     {
    31.                         GameObject hitGO = exposed.gameObject;
    32.                         if (multiselect)
    33.                         {
    34.                             List<Object> selection;
    35.                             if (RuntimeSelection.objects != null)
    36.                             {
    37.                                 selection = RuntimeSelection.objects.ToList();
    38.                             }
    39.                             else
    40.                             {
    41.                                 selection = new List<Object>();
    42.                             }
    43.  
    44.                             if (selection.Contains(hitGO))
    45.                             {
    46.                                 selection.Remove(hitGO);
    47.                                 if (rangeSelect)
    48.                                 {
    49.                                     selection.Insert(0, hitGO);
    50.                                 }
    51.                             }
    52.                             else
    53.                             {
    54.                                 selection.Insert(0, hitGO);
    55.                             }
    56.                             RuntimeSelection.Select(hitGO, selection.ToArray());
    57.                         }
    58.                         else
    59.                         {
    60.                             RuntimeSelection.activeObject = hitGO;
    61.                         }
    62.                     }
    63.                     else
    64.                     {
    65.                         if (!multiselect)
    66.                         {
    67.                             RuntimeSelection.activeObject = null;
    68.                         }
    69.                     }
    70.                 }
    71.                 else
    72.                 {
    73.                     if (!multiselect)
    74.                     {
    75.                         RuntimeSelection.activeObject = null;
    76.                     }
    77.                 }
    78.             }
    79.  
    80.             if (RuntimeEditorApplication.IsActiveWindow(this))
    81.             {
    82.                 if (InputController.GetKeyDown(SelectAllKey) && InputController.GetKey(ModifierKey))
    83.                 {
    84.                     IEnumerable<GameObject> filtered = RuntimeEditorApplication.IsPlaying ?
    85.                           ExposeToEditor.FindAll(ExposeToEditorObjectType.PlayMode) :
    86.                           ExposeToEditor.FindAll(ExposeToEditorObjectType.EditorMode);
    87.                     RuntimeSelection.objects = filtered.ToArray();
    88.                 }
    89.             }
    90.         }
    As for the second problem I ran the game for more than 10 minutes and does not find anything unusual. I was able to select objects and transform handles were visible.
    Do you have the same problem with clean project?
     

    Attached Files:

    Last edited: Oct 12, 2017
  23. Havoc_247

    Havoc_247

    Joined:
    Oct 27, 2017
    Posts:
    1
    I am having an issue when i assign prefabs to the prefabs list after exposing them to the editor and i run the program i click on the prefabs folder in the RTE and the prefabs that i assigned automatically are put onto the game/editor screen and they are not editable until i delete them and drag them back from the asset folders. I'm not sure if this is a bug with 2017.1.0f3 or i have a setting wrong can someone please help
     
  24. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi,
    thank you for reporting about problem, but I don't understand this:

    "and the prefabs that i assigned automatically are put onto the game/editor screen and they are not editable until i delete them and drag them back from the asset folders"

    Could you provide detailed steps to reproduce?

    Thanks,
    Vadim
     
  25. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    14
    Hi Vladim, your asset looks like a great product. I bought it a few days ago, installed it under Unity 2017.1.0 and after Build Assembly in Mono I got a lot of errors in your script. Did I miss something? Could you give me any advice?
    Thank you in advance.
     

    Attached Files:

  26. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi, thank you for buying RuntimeEditor.
    First I didn't noticed you write that you use Mono and even record video which demonstrate successful build process using VisualStudio


    Then I tried to do the same with Mono and got exactly same errors as you are.

    To fix them do following:

    1) Replace PropertyDescriptor struct in ComponentEditor.cs with this one:

    Code (CSharp):
    1.  public struct PropertyDescriptor
    2.     {
    3.         public string Label;
    4.         public MemberInfo MemberInfo;
    5.         public MemberInfo ComponentMemberInfo;
    6.         public PropertyEditorCallback ValueChangedCallback;
    7.         public Range Range;
    8.  
    9.         public PropertyDescriptor[] ChildDesciptors;
    10.    
    11.         public Type MemberType
    12.         {
    13.             get
    14.             {
    15.                 if(Range != null)
    16.                 {
    17.                     return Range.GetType();
    18.                 }
    19.  
    20.                 if (MemberInfo is PropertyInfo)
    21.                 {
    22.                     PropertyInfo prop = (PropertyInfo)MemberInfo;
    23.                     return prop.PropertyType;
    24.                 }
    25.                 else if (MemberInfo is FieldInfo)
    26.                 {
    27.                     FieldInfo field = (FieldInfo)MemberInfo;
    28.                     return field.FieldType;
    29.                 }
    30.  
    31.                 return null;
    32.             }
    33.         }
    34.  
    35.  
    36.         public object Target;
    37.      
    38.         public PropertyDescriptor(string label, object target, MemberInfo memberInfo)
    39.         {
    40.             MemberInfo = memberInfo;
    41.             ComponentMemberInfo = memberInfo;
    42.             Label = label;
    43.            Target = target;
    44.             ValueChangedCallback = null;
    45.             Range = null;
    46.             ChildDesciptors = null;
    47.         }
    48.  
    49.         public PropertyDescriptor(string label, object target, MemberInfo memberInfo, MemberInfo componentMemberInfo)
    50.         {
    51.             MemberInfo = memberInfo;
    52.             ComponentMemberInfo = componentMemberInfo;
    53.             Label = label;
    54.            Target = target;
    55.             ValueChangedCallback = null;
    56.             Range = null;
    57.             ChildDesciptors = null;
    58.         }
    59.  
    60.         public PropertyDescriptor(string label, object target, MemberInfo memberInfo, MemberInfo componentMemberInfo, PropertyEditorCallback valueChangedCallback)
    61.         {
    62.             MemberInfo = memberInfo;
    63.             ComponentMemberInfo = componentMemberInfo;
    64.             Label = label;
    65.             Target = target;
    66.             ValueChangedCallback = valueChangedCallback;
    67.             Range = null;
    68.             ChildDesciptors = null;
    69.         }
    70.  
    71.         public PropertyDescriptor(string label, object target, MemberInfo memberInfo, MemberInfo componentMemberInfo, PropertyEditorCallback valueChangedCallback, Range range)
    72.         {
    73.             MemberInfo = memberInfo;
    74.             ComponentMemberInfo = componentMemberInfo;
    75.             Label = label;
    76.            Target = target;
    77.             ValueChangedCallback = valueChangedCallback;
    78.             Range = range;
    79.             ChildDesciptors = null;
    80.         }
    81.     }
    2) Remove or comment following line "fields = new Dictionary<string, DataContract>();" in PersistentScript.cs
    Code (CSharp):
    1.       public override void ReadFrom(object obj)
    2.         {
    3.             base.ReadFrom(obj);
    4.           //  fields = new Dictionary<string, DataContract>();
    5.  
    6.             if (baseObjectData != null)
    7.             {
    8.                 baseObjectData.ReadFrom(obj);
    9.             }
     

    Attached Files:

  27. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    14
    @Vadim
    Thank you for quick response and solution! Everything works. THUMBUP
     
  28. Blesu

    Blesu

    Joined:
    Nov 9, 2017
    Posts:
    1
    Hi @Vadim-Andriyanov . Firstly I would like to say, that the asset you created is great!
    Could you give me a tip, about enabling scene saving and loading in webgl build? I assume that I need to change saving to the file system to sending scene to my server, same with loading, am I right?
     
  29. samuelmorais

    samuelmorais

    Joined:
    Aug 3, 2012
    Posts:
    62
    Hi, @Vadim-Andriyanov ,

    I am having a problem trying to build to WebGL. Tried at 2017.2.0f3 (Mac and Windows), 2017.1.2f1 and Unity 5.6. In each of them I needed to comment some lines to compile at Unity first. And then, when I try to build to WebGL, it gives this errors (in all platforms the error occurs, but in 5.6 the message is a little bit different):

    EDIT: for anyone having this problem, you just need to go to Tools -> Runtime SaveLoad -> Build all and the problem is gone! Now I can build to WebGL.
     

    Attached Files:

    Last edited: Dec 3, 2017
  30. CGSpc

    CGSpc

    Joined:
    Feb 19, 2014
    Posts:
    8
    It has some Issues with unity 2017.3.0f2.
    I hope we have a compatible version soon.
     
  31. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Here is the quick fix for 2017.2.1 and 2017.3.0.f2
     

    Attached Files:

  32. CGSpc

    CGSpc

    Joined:
    Feb 19, 2014
    Posts:
    8
    thanks Vadim. I will check it soon.
     
  33. stoddartc1

    stoddartc1

    Joined:
    Feb 18, 2014
    Posts:
    2
    When importing an audio clip at runtime, and then restarting the editor, it throws an: Unable to instantiate object of type UnityEngine.AudioClip.
    Also, I want to be able to edit colliders (mesh, sphere, cube) as if they were a component in the runtime editor, and can't seem to find them in the configuration.
    Another thing, when placing a gameobject at runtime, the runtime editor resets the rotation to 0,0,0 rather than what is stored
    Edit: aaaaand one more thing, the default component editor does not seem to work with components that inherit other classes, is there any way this could be added?
    Also, exposing objects that have components with arrays/lists on them with a length of zero reacts weirdly with the runtime editor, as it does not initialize them, leaving them null. I was able to fix this one myself, but perhaps for a future patch it could be fixed
    Another thing, if you make a gameobject a child of another, and then try to select using the component editor, it doesn't appear
     
    Last edited: Jan 8, 2018
  34. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    14
    Hi, @Vadim-Andriyanov,
    I am using 2017.3.f3 with Mono. When I tried to build Win64 app I got these 5 errors. I have the same problem with clean project.
     

    Attached Files:

  35. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi please import attached file.
     

    Attached Files:

  36. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    Hi, sorry for late reply,
    I started to work on big RTEditor update. Going to fix these issues also.
     
  37. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    14
    Thank you @Vadim. It works like a charm!
     
  38. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Hello! I was wondering if there would be a way to Mask the Gizmos from any Post Processing Effects so that they aren't affected by any Anti-Aliasing, Color Grading, etc?
     
  39. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    Does this still work? Doesn't seem to work for me. Does it work on the 2017 versions? (2017.3.0f3)
     
  40. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Works on 2017.2.1f1
     
  41. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    I think I misunderstood a few things but it works.

    Here's a few things I didn't know... may help someone.

    • When you change ResourceMapGen -> Only those objects with "Expose to Editor" will appear in the in-game Hierarchy panel.
    • Objects (at least in my experience) will never appear in the project panel unless added to ProjectTemplate OR persistentdatapath. If they're added to ProjectTemplate they can be in any folder in the project.
      • If they are in persistentdatapath they will always be in your Project Panel (which can be confusing).
        Example: If you happen to use the "AddResourcesTest" script it will add objects. You will not be able to remove these objects unless you remove them from your persistentdatapath.
      • I don't think disabling scripts will stop them from altering RT but I could be wrong.
    • If you remove "ProjectTemplate" from "RuntimeEditor" you can no longer use Tools->Runtime Editor->Expose to Editor. It will just put a warning in the console saying it cannot do that.
     
  42. stoddartc1

    stoddartc1

    Joined:
    Feb 18, 2014
    Posts:
    2
    Awesome! Looking forward to the update
     
  43. yumianhuli1

    yumianhuli1

    Joined:
    Mar 14, 2015
    Posts:
    92
    Hello,Can I attach a C# script on GameObject in your Game-in Editor?
     
  44. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    125
    There is no add component button in GameObject editor, but I think it is possible to implement
     
  45. yumianhuli1

    yumianhuli1

    Joined:
    Mar 14, 2015
    Posts:
    92
    Great
    Great!
     
  46. Unity1-ManusVR

    Unity1-ManusVR

    Joined:
    Mar 7, 2018
    Posts:
    1
    Hi, @Vadim-Andriyanov,

    One of my scripts has a public List<CustomScript> which I want to exclude when saving the scene. It does however have other properties that I want to include when serializing the scene. Does your system support functionality for excluding properties when serializing the script? I was hoping that there is a solution like adding [NonSerialized] as attribute to the property.

    Here is an example of what I want to achieve:

    Code (CSharp):
    1.     // Should be serialized
    2.     public int id;
    3.     public int hp;
    4.  
    5.     // Should not be serialized
    6.     [NonSerialized]
    7.     public List<CustomScript> CustomScripts = new List<CustomScript>();
    Regards,
    Frank
     
  47. str11ngfell0

    str11ngfell0

    Joined:
    Apr 16, 2016
    Posts:
    2
    Hi,

    Just bought the Runtime Editor and using the latest Unity 2017 as of today. I created a new scene and then Tools->Runtime Editor->Create. Added the scene to my project settings and tried to build for WebGL. But it gives me errors. Can't wait to explore this package but wanted to try a simple WebGL export first. What am I doing wrong?

    Playing in the editor works find.
     

    Attached Files:

  48. str11ngfell0

    str11ngfell0

    Joined:
    Apr 16, 2016
    Posts:
    2
    Able to build MacOS desktop just fine.
     
  49. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Anyone else experiencing an issue with the latest update where GridSelection isn't working properly? It's sometimes invisible, sometimes offscreen and other times doesn't work at all. Using 2017.3.1p1

    EDIT: It doesn't work in build, but in editor it starts working if i go to the hierarchy window and drop down the BoxSelectionCanvas Object and then Click on it's child object (BoxSelection) so that it visible in the Inspector. Then Box Selection works, else if i drag without doing this, the box starts at the bottom left corner and never at the mouse click position. Tested SEVERAL times, 100% the same every time.
     
    Last edited: Mar 10, 2018
  50. august_almgren

    august_almgren

    Joined:
    Sep 6, 2017
    Posts:
    2
    Hi @Vadim-Andriyanov,

    I'm having a problem where nothing is showing up under the Project section of the UI when I try to follow the video for setting up the demo. I've created the runtime editor, exposed the prefabs, textures and materials, and built the resource map (I also tried building all with the same result). Any idea why this is happening?

    Regards,
    August

    Edit: I managed to fix the problem by returning on catching the following exceptions:
    // ProjectManager:1984
    Dictionary<string, ProjectItem> children;
    try {
    children = dst.Children != null ?
    dst.Children.ToDictionary(child => child.ToString()) :
    new Dictionary<string, ProjectItem>();
    } catch (ArgumentException e) {
    // handle already existing key
    return;
    }

    // Projectmanager:2099
    try {
    data[descriptor.InstanceId] = otherData[descriptor.InstanceId];
    } catch (KeyNotFoundException e) {
    // handle non existing key
    return;
    }

    Not the cleanest solution but it fixes the problem.
     
    Last edited: Mar 22, 2018