<commit_before>﻿using System;
using UnityEngine;
using UnityEditor;

namespace SerializationTest.Test1
{

	public class MyClass {
		public string s;

		public void OnGUI() {
			s = EditorGUILayout.TextField("public string s", s);
		}
	}

	[Serializable]
	public class MyClassSerializable {
		public float f1;
		[NonSerialized]public float f2;
		private int i1;
		[SerializeField]private int i2;

		public void OnGUI() {
			f1 = EditorGUILayout.Slider("public float f1", f1, 0, 100);
			f2 = EditorGUILayout.Slider("[NonSerialized]public float f2", f2, 0, 100);
			i1 = EditorGUILayout.IntSlider("private int i1", i1, 0, 100);
			i2 = EditorGUILayout.IntSlider("[SerializeField]private int i2", i2, 0, 100);
		}
	}

	public class TestWindow1 : EditorWindow {
		public MyClass m1;
		public MyClassSerializable s1;
		private MyClassSerializable s2;

		void OnEnable() {
			if(m1 == null)
				m1 = new MyClass();
			if(s1 == null)
				s1 = new MyClassSerializable();
			if(s2 == null)
				s2 = new MyClassSerializable();

			titleContent.text = "Serialization Rule";
		}

		void OnGUI() {
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("public MyClass m1");
			m1.OnGUI();
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("public MyClassSerializable s1");
			s1.OnGUI();
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("private MyClassSerializable s2");
			s2.OnGUI();
		}

		[MenuItem ("Window/Serialization Test/Test 1 - Serialization Rule")]
		public static void  ShowWindow()
		{
			EditorWindow.GetWindow<TestWindow1>();
		}

	} // class TestWindow1

} // namespace SerializationTest.Test1<commit_msg>rename test1<commit_after>﻿using System;
using UnityEngine;
using UnityEditor;

namespace SerializationTest.Test1
{

	public class MyClass {
		public string s;

		public void OnGUI() {
			s = EditorGUILayout.TextField("public string s", s);
		}
	}

	[Serializable]
	public class MyClassSerializable {
		public float f1;
		[NonSerialized]public float f2;
		private int i1;
		[SerializeField]private int i2;

		public void OnGUI() {
			f1 = EditorGUILayout.Slider("public float f1", f1, 0, 100);
			f2 = EditorGUILayout.Slider("[NonSerialized]public float f2", f2, 0, 100);
			i1 = EditorGUILayout.IntSlider("private int i1", i1, 0, 100);
			i2 = EditorGUILayout.IntSlider("[SerializeField]private int i2", i2, 0, 100);
		}
	}

	public class SerializationRuleWindow : EditorWindow {
		private const string WINDOW_TITLE = "Serialization Rule";

		public MyClass m1;
		public MyClassSerializable s1;
		private MyClassSerializable s2;

		void OnEnable() {
			if(m1 == null)
				m1 = new MyClass();
			if(s1 == null)
				s1 = new MyClassSerializable();
			if(s2 == null)
				s2 = new MyClassSerializable();

			titleContent.text = WINDOW_TITLE;
		}

		void OnGUI() {
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("public MyClass m1");
			m1.OnGUI();
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("public MyClassSerializable s1");
			s1.OnGUI();
			EditorGUILayout.Space();
			EditorGUILayout.LabelField("private MyClassSerializable s2");
			s2.OnGUI();
		}

		[MenuItem ("Window/Serialization Test/Test 1 - " + WINDOW_TITLE)]
		public static void  ShowWindow()
		{
			EditorWindow.GetWindow<SerializationRuleWindow>();
		}

	} // class SerializationRuleWindow

} // namespace SerializationTest.Test1
{'fraction_non_alphanumeric': 0.116751269035533, 'fraction_numerical': 0.031054045983875785, 'mean_word_length': 4.122324159021407, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5324817', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1134, 'n_words': 272}