Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
SubdivisionUtility.cs
बनाया गया
3 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
3 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
76 लाइनें
सभी को कॉपी करें
4 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
77 लाइनें
सभी को कॉपी करें
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
using UnityEditor;
using UnityEditor;
namespace Torec
namespace Torec
{
{
public class SubdivisionUtility : EditorWindow
public class SubdivisionUtility : EditorWindow
{
{
public SubdivisionUtility() {
public SubdivisionUtility() {
titleContent.text = "Torec/Subdivision";
titleContent.text = "Torec/Subdivision";
}
}
Vector2 selectionScroll = Vector2.zero;
Vector2 selectionScroll = Vector2.zero;
int iterations = 1;
int iterations = 1;
CatmullClark.Options.BoundaryInterpolation boundaryInterpolation;
CatmullClark.Options.BoundaryInterpolation boundaryInterpolation;
void OnGUI() {
void OnGUI() {
EditorGUIUtility.labelWidth = 80;
EditorGUIUtility.labelWidth = 80;
Transform[] selection = Selection.transforms;
Transform[] selection = Selection.transforms;
// Selection
// Selection
EditorGUILayout.BeginHorizontal();
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField("Selection", GUILayout.Width(80));
EditorGUILayout.LabelField("Selection", GUILayout.Width(80));
selectionScroll = EditorGUILayout.BeginScrollView(selectionScroll);
selectionScroll = EditorGUILayout.BeginScrollView(selectionScroll);
foreach (Transform t in selection) {
foreach (Transform t in selection) {
EditorGUILayout.LabelField(t.name);
EditorGUILayout.LabelField(t.name);
}
}
EditorGUILayout.EndScrollView();
EditorGUILayout.EndScrollView();
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndHorizontal();
// Iterations
// Iterations
iterations = (int)EditorGUILayout.Slider("Iterations", iterations, 1, 5);
iterations = (int)EditorGUILayout.Slider("Iterations", iterations, 1, 5);
// Boundaries
// Boundaries
boundaryInterpolation = (CatmullClark.Options.BoundaryInterpolation)
boundaryInterpolation = (CatmullClark.Options.BoundaryInterpolation)
EditorGUILayout.EnumPopup("Boundaries", boundaryInterpolation);
EditorGUILayout.EnumPopup("Boundaries", boundaryInterpolation);
// Button
// Button
if (GUILayout.Button("Subdivide")) {
if (GUILayout.Button("Subdivide")) {
if (selection.Length == 0) throw new System.Exception("Nothing selected to subdivide");
if (selection.Length == 0) throw new System.Exception("Nothing selected to subdivide");
var options = new CatmullClark.Options {
var options = new CatmullClark.Options {
boundaryInterpolation = boundaryInterpolation,
boundaryInterpolation = boundaryInterpolation,
};
};
foreach (Transform t in selection) {
foreach (Transform t in selection) {
// Add Undo record
// Add Undo record
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
MeshFilter mf
= CatmullClark.
CheckMeshFilter
(t.gameObject);
// メソッドの仕様変更に合わせて型を変える
Undo.RecordObject(
mf
, "Subdivide " + t.name);
Component c
= CatmullClark.
CheckMeshComponent
(t.gameObject);
Undo.RecordObject(
c
, "Subdivide " + t.name);
// Subdivide
// Subdivide
CatmullClark.Subdivide(t.gameObject, iterations, options);
CatmullClark.Subdivide(t.gameObject, iterations, options);
}
}
if (selection.Length > 1) {
if (selection.Length > 1) {
Undo.SetCurrentGroupName(string.Format("Subdivide {0} objects", selection.Length));
Undo.SetCurrentGroupName(string.Format("Subdivide {0} objects", selection.Length));
}
}
}
}
}
}
void OnInspectorUpdate() {
void OnInspectorUpdate() {
// Permanently update list of selected objects
// Permanently update list of selected objects
// ~ 10 times per sec
// ~ 10 times per sec
Repaint();
Repaint();
}
}
[MenuItem("Torec/Subdivision")]
[MenuItem("Torec/Subdivision")]
static void ShowSubdivisionUtility() {
static void ShowSubdivisionUtility() {
if (window == null) {
if (window == null) {
window = ScriptableObject.CreateInstance<SubdivisionUtility>();
window = ScriptableObject.CreateInstance<SubdivisionUtility>();
}
}
window.ShowUtility();
window.ShowUtility();
}
}
static private SubdivisionUtility window = null;
static private SubdivisionUtility window = null;
}
}
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace Torec { public class SubdivisionUtility : EditorWindow { public SubdivisionUtility() { titleContent.text = "Torec/Subdivision"; } Vector2 selectionScroll = Vector2.zero; int iterations = 1; CatmullClark.Options.BoundaryInterpolation boundaryInterpolation; void OnGUI() { EditorGUIUtility.labelWidth = 80; Transform[] selection = Selection.transforms; // Selection EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Selection", GUILayout.Width(80)); selectionScroll = EditorGUILayout.BeginScrollView(selectionScroll); foreach (Transform t in selection) { EditorGUILayout.LabelField(t.name); } EditorGUILayout.EndScrollView(); EditorGUILayout.EndHorizontal(); // Iterations iterations = (int)EditorGUILayout.Slider("Iterations", iterations, 1, 5); // Boundaries boundaryInterpolation = (CatmullClark.Options.BoundaryInterpolation) EditorGUILayout.EnumPopup("Boundaries", boundaryInterpolation); // Button if (GUILayout.Button("Subdivide")) { if (selection.Length == 0) throw new System.Exception("Nothing selected to subdivide"); var options = new CatmullClark.Options { boundaryInterpolation = boundaryInterpolation, }; foreach (Transform t in selection) { // Add Undo record MeshFilter mf = CatmullClark.CheckMeshFilter(t.gameObject); Undo.RecordObject(mf, "Subdivide " + t.name); // Subdivide CatmullClark.Subdivide(t.gameObject, iterations, options); } if (selection.Length > 1) { Undo.SetCurrentGroupName(string.Format("Subdivide {0} objects", selection.Length)); } } } void OnInspectorUpdate() { // Permanently update list of selected objects // ~ 10 times per sec Repaint(); } [MenuItem("Torec/Subdivision")] static void ShowSubdivisionUtility() { if (window == null) { window = ScriptableObject.CreateInstance<SubdivisionUtility>(); } window.ShowUtility(); } static private SubdivisionUtility window = null; } }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace Torec { public class SubdivisionUtility : EditorWindow { public SubdivisionUtility() { titleContent.text = "Torec/Subdivision"; } Vector2 selectionScroll = Vector2.zero; int iterations = 1; CatmullClark.Options.BoundaryInterpolation boundaryInterpolation; void OnGUI() { EditorGUIUtility.labelWidth = 80; Transform[] selection = Selection.transforms; // Selection EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Selection", GUILayout.Width(80)); selectionScroll = EditorGUILayout.BeginScrollView(selectionScroll); foreach (Transform t in selection) { EditorGUILayout.LabelField(t.name); } EditorGUILayout.EndScrollView(); EditorGUILayout.EndHorizontal(); // Iterations iterations = (int)EditorGUILayout.Slider("Iterations", iterations, 1, 5); // Boundaries boundaryInterpolation = (CatmullClark.Options.BoundaryInterpolation) EditorGUILayout.EnumPopup("Boundaries", boundaryInterpolation); // Button if (GUILayout.Button("Subdivide")) { if (selection.Length == 0) throw new System.Exception("Nothing selected to subdivide"); var options = new CatmullClark.Options { boundaryInterpolation = boundaryInterpolation, }; foreach (Transform t in selection) { // Add Undo record // メソッドの仕様変更に合わせて型を変える Component c = CatmullClark.CheckMeshComponent(t.gameObject); Undo.RecordObject(c, "Subdivide " + t.name); // Subdivide CatmullClark.Subdivide(t.gameObject, iterations, options); } if (selection.Length > 1) { Undo.SetCurrentGroupName(string.Format("Subdivide {0} objects", selection.Length)); } } } void OnInspectorUpdate() { // Permanently update list of selected objects // ~ 10 times per sec Repaint(); } [MenuItem("Torec/Subdivision")] static void ShowSubdivisionUtility() { if (window == null) { window = ScriptableObject.CreateInstance<SubdivisionUtility>(); } window.ShowUtility(); } static private SubdivisionUtility window = null; } }
अंतर खोजें