Esempio n. 1
0
        private static void DrawResourcesWarning(Rect position, SerializedProperty property, ref int line)
        {
            var subfolder = PhotonSyncManager.GetResourcesSubfolder(property.GetParent().GetType());

            if (property.IsInResourcesFolder(subfolder))
            {
                return;
            }

            EditorGUI.HelpBox(position.GetLines(line, 2), PhotonSync.WARNING_ASSET_NOT_IN_RESOURCES_FOLDER(subfolder), MessageType.Error);
            line += 2;
        }
Esempio n. 2
0
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            var lines = 1;

            if (property.FindPropertyRelative("PUNSync").boolValue)
            {
                lines++;

                if (!property.IsInResourcesFolder(PhotonSyncManager.GetResourcesSubfolder(property.GetParent().GetType())))
                {
                    lines += 2;
                }
            }

            return(EditorUtil.PropertyHeight(lines));
        }