david.cambre Posted August 16, 2020 Posted August 16, 2020 Hi, Is there a official naming convention for programming in Unigine2 ? Following examples do not break the code but limit the functionality of the editor. No spaces in project names No underscore in ParameterCondition names
silent Posted August 17, 2020 Posted August 17, 2020 Hi David, You can create a project with spaces, should be no issues here. Could you please give us more info on ParameterCondition names (a few examples)? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
david.cambre Posted August 17, 2020 Author Posted August 17, 2020 Hi Silent, When encountering following problem I simply started a new project using “_”. Pseudo code public bool disable_someParameter = false; [parametercondition(“disable_someParameter”, 1)] public string s = “shown in editor” ; public bool disableSomeParameter = true; [parametercondition(“disableSomeParameter”, 1)] public string s = “hiden in editor”;
silent Posted August 17, 2020 Posted August 17, 2020 Issue with space in project name should be already fixed (it was found in 2.11). Also there is no any restrictions on underscore usage in ParameterCondition. If you wan to show the exact name in the Editor you can use following code: [Parameter(Title="disable_someParameter")] public bool disable_someParameter = false; [ParameterCondition("disable_someParameter", 1)] public string s = "shown in editor" ; How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
david.cambre Posted August 17, 2020 Author Posted August 17, 2020 The error does not seem to be consistent. Yesterday the “_” set gave no hidden fields. now 2 out of 3 are hidden. After reimporting the script all 3 where hidden.
silent Posted August 18, 2020 Posted August 18, 2020 Hi David, What is your SDK version where you are testing this behavior? This issue with partial ParameterCondition displaying should be already fixed in the latest 2.12 SDK version (and it's not related to the underscore symbol, the update mechanism simply was bugged in 2.11). Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
silent Posted August 18, 2020 Posted August 18, 2020 Could you please also send us a log_*.txt files from <Project>/bin directory? That would help us to diagnose the root cause of this issue. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
david.cambre Posted August 18, 2020 Author Posted August 18, 2020 (edited) Recreated the bug copied image v1 and _log1.txt log_1.txt Then figured out the steps to recreated the condition. Set the value to not default (highlighted in green) same value as default is aloud see image v2. change the condition variable name and (auto)reimport. The parameter will no longer be hidden. Change the value back to default using the ccw arow (Normal grey). RMB reimport and all is ok again. For v2 _log.txt was not to be found so you get log.txt log.txt Edited August 18, 2020 by david.cambre
silent Posted August 19, 2020 Posted August 19, 2020 Thank you! Will try to reproduce this on our side. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts