Completed the In-Editor NPC designer

Completed the In-Editor NPC designer
Tomorrow I will work on making it import presets made in game.
This commit is contained in:
Schaken-Mods 2023-04-26 23:08:12 -05:00
parent d2c5e0c92c
commit c0b5164915
616 changed files with 162651 additions and 157966 deletions

View File

@ -90,6 +90,6 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.9764706, g: 0.9764706, b: 0.9764706, a: 1}
m_BuildTextureStacks: []

View File

@ -90,6 +90,6 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.5882353, g: 0.8, b: 0.60784316, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.60784316, g: 0.8784314, b: 1, a: 1}
m_BuildTextureStacks: []

View File

@ -77,7 +77,7 @@ Material:
- _QueueControl: 1
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.6509804, g: 0.44705883, b: 0.2627451, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.76862746, g: 0.7058824, b: 0.6392157, a: 1}
m_BuildTextureStacks: []
--- !u!114 &4763607747774166598

View File

@ -90,6 +90,6 @@ Material:
- _QueueControl: 1
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.48235294, g: 0.48235294, b: 0.48235294, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.76862746, g: 0.76862746, b: 0.76862746, a: 1}
m_BuildTextureStacks: []

View File

@ -84,7 +84,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9411765, g: 0.8862745, b: 0.8392157, a: 1}
- _Diffuse: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -97,7 +97,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.98039216, g: 0.9254902, b: 0.8784314, a: 1}
- _Diffuse: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -83,7 +83,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9411765, g: 0.8862745, b: 0.8392157, a: 1}
- _Diffuse: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -96,7 +96,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9372549, g: 0.88235295, b: 0.83137256, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.827451, g: 0.8, b: 0.74509805, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -96,7 +96,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.85882354, g: 0.8039216, b: 0.75686276, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.827451, g: 0.8, b: 0.74509805, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -96,7 +96,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9372549, g: 0.88235295, b: 0.83137256, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.827451, g: 0.8, b: 0.74509805, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -83,7 +83,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9372549, g: 0.88235295, b: 0.83137256, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -83,7 +83,7 @@ Material:
- _QueueControl: 1
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9372549, g: 0.88235295, b: 0.83137256, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -83,7 +83,7 @@ Material:
- _QueueControl: 1
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.85882354, g: 0.8039216, b: 0.75686276, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -96,7 +96,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Diffuse: {r: 0.9372549, g: 0.88235295, b: 0.83137256, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.9411765, g: 0.9411765, b: 0.9411765, a: 1}
- _SpecularColorSecondary: {r: 0.5, g: 0.5, b: 0.5, a: 0}
m_BuildTextureStacks: []

View File

@ -167,7 +167,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.9137255, b: 0.89411765, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 0.92941177, g: 0.92941177, b: 0.92941177, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -180,7 +180,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.9137255, b: 0.89411765, a: 1}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 1}

View File

@ -178,7 +178,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 0, b: 0, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

View File

@ -165,7 +165,7 @@ Material:
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Diffuse: {r: 1, g: 0.83098835, b: 0.7589098, a: 0.15686275}
- _Diffuse: {r: 1, g: 1, b: 1, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 1}
- _Offset: {r: 0, g: 0, b: 0, a: 0}
- _SpecularColor: {r: 0.23137255, g: 0.23137255, b: 0.23137255, a: 1}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9bb80c98833a02f4ea898aa8e713c27c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -67,10 +67,18 @@ namespace RPGCreationKit.AI
public RckAI RckAIPrefabComponent; // The RckAI script of the RckAIPrefab
public GameObject RckAIGfx;
Color HairColor = Color.white;
Color SkinColor = Color.white;
Color LipsColor = Color.white;
public List<Material> OrigHair;
public List<Material> OrigSkin;
public List<Material> OrigLips;
private bool FullBodyPreview = true;
private bool Preview = false;
private bool NewGenerated = false;
struct HairSelection
{
@ -355,12 +363,22 @@ namespace RPGCreationKit.AI
GUI.color = defaultColor;
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Select Prefab", GUILayout.Width(125), GUILayout.Height(20)))
{
Selection.objects = new GameObject[] { RckAIAsset };
}
EditorGUILayout.Space(30);
if (GUILayout.Button("Import Preset", GUILayout.Width(125), GUILayout.Height(20)))
{
// Open file selector
}
EditorGUILayout.EndHorizontal();
#endregion
contentScrollView = EditorGUILayout.BeginScrollView(contentScrollView, GUIStyle.none, GUI.skin.verticalScrollbar, GUILayout.Width(850.0f), GUILayout.Height(500.0f));
@ -617,11 +635,11 @@ namespace RPGCreationKit.AI
if (GUILayout.Button("Full View")) {
FullBodyPreview = true;
RefreshMyWindow();
OnSelectedRckAIChanges();
}
if (GUILayout.Button("Head Only")) {
FullBodyPreview = false;
RefreshMyWindow();
OnSelectedRckAIChanges();
}
EditorGUILayout.EndHorizontal();
@ -684,7 +702,7 @@ namespace RPGCreationKit.AI
bodyData.hairIndex = hSel.index;
SkinnedMeshRenderer selectedHead = null;
selectedHead = (RckAIGfx).GetComponent<BodyData>().head;
selectedHead = bodyData.head;
HeadBlendshapesManager HBM = selectedHead.GetComponent<HeadBlendshapesManager>();
if (hSel.isMale)
@ -1130,6 +1148,23 @@ namespace RPGCreationKit.AI
Instantiate(Map_Util, RckAIPrefab.transform);
}
RckAIGfx = RckAIPrefab.transform.Find("GFX").gameObject; // Save the colors
BodyData BD = RckAIGfx.GetComponent<BodyData>();
BD.LipsColor = LipsColor;
BD.SkinColor = SkinColor;
BD.HairColor = HairColor;
Debug.Log("NewGenerates = "+NewGenerated);
if (NewGenerated == false) {
ResetHairColor();
ResetSkinColor();
ResetLipsColor();
}
NewGenerated = false;
SaveEditorVariablesToPrefab();
previouEntityID = RckAIPrefabComponent.entityID;
@ -1148,18 +1183,29 @@ namespace RPGCreationKit.AI
AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath(RckAIAsset), "[AI] " + RckAIPrefabComponent.entityID);
PrefabUtility.SaveAsPrefabAsset(RckAIPrefab, AssetDatabase.GetAssetPath(RckAIAsset));
if (newPref || haveToReRegister)
if (newPref || haveToReRegister) {
RegisterPersistentReference();
}
newPref = removePref = updatePref = haveToReRegister = false;
// Refresh database
var AllAIDatabaseFiles = GetAllInstances<AIDatabaseFile>();
foreach (AIDatabaseFile file in AllAIDatabaseFiles)
foreach (AIDatabaseFile file in AllAIDatabaseFiles) {
file.fill();
}
if (RckAIPrefab.transform.Find("DefaultWeapon") != null) { // Lets setup the hitmarks
GameObject DW = RckAIPrefab.transform.Find("DefaultWeapon").gameObject;
WeaponOnHand WOH = DW.GetComponent<WeaponOnHand>();
WOH.GFX = BD;
WOH.GrabHitmarks();
}
OnSelectedRckAIChanges();
}
if (GUILayout.Button("SAVE & CLOSE", ButtonStyle))
{
if (RckAIAsset != null && RckAIPrefab != null)
@ -1181,6 +1227,8 @@ namespace RPGCreationKit.AI
RegisterPersistentReference();
newPref = removePref = updatePref = haveToReRegister = false;
Debug.Log("oldPref");
}
@ -1200,6 +1248,28 @@ namespace RPGCreationKit.AI
this.Close();
}
/*
if (GUILayout.Button("test Orig names", ButtonStyle)) {
for (int i = 0; i < OrigHair.Count; i++)
Debug.Log(OrigHair[i].name);
}
if (GUILayout.Button("test pref names", ButtonStyle)) {
BodyData DB = RckAIGfx.GetComponent<BodyData>();
for (int i = 0; i < DB.hair.materials.Length; i++)
Debug.Log(DB.hair.materials[i].name);
}
if (GUILayout.Button("Default Hair", ButtonStyle)) {
BodyData DB = RckAIGfx.GetComponent<BodyData>();
Material[] TempMe = new Material[DB.hair.materials.Length];
for (int i = 0; i < DB.hair.materials.Length; i++)
TempMe[i] = OrigHair[i];
DB.hair.materials = TempMe;
}
*/
EditorGUILayout.EndHorizontal();
GUILayout.FlexibleSpace();
}
@ -1218,6 +1288,7 @@ namespace RPGCreationKit.AI
a.refID = RckAIPrefabComponent.entityID;
a.type = PersistentReferences.PersistentReferenceType.AI;
newPref = true;
Debug.Log("NewPref");
}
// The user wanted to remove persistent reference form this AI
@ -1395,18 +1466,18 @@ namespace RPGCreationKit.AI
}
BodyData BD = (RckAIGfx).GetComponent<BodyData>();
LipsColor = BD.LipsColor;
SkinColor = BD.SkinColor;
HairColor = BD.HairColor;
OnChangeHairColor(HairColor);
SkinColor = BD.SkinColor;
OnChangeSkinColor(SkinColor);
LipsColor = BD.LipsColor;
OnChangeLipsColor(LipsColor);
}
private void GenerateNewGFX()
{
NewGenerated = true;
if (RckAIPrefab.transform.Find("GFX") != null) {
DestroyImmediate(RckAIPrefab.transform.Find("GFX").gameObject);
}
@ -1462,7 +1533,19 @@ namespace RPGCreationKit.AI
// Update RckAI_Prefab Animator
}
if (RckAIPrefab.transform.Find("DefaultWeapon") != null) { // Lets setup the hitmarks
GameObject DW = RckAIPrefab.transform.Find("DefaultWeapon").gameObject;
RckAIGfx = RckAIPrefab.transform.Find("GFX").gameObject;
BodyData BD = RckAIGfx.GetComponent<BodyData>();
WeaponOnHand WOH = DW.GetComponent<WeaponOnHand>();
WOH.GFX = BD;
WOH.GrabHitmarks();
}
DestroyImmediate(windowEditor);
}
private void UnloadPrefab()
@ -1530,70 +1613,136 @@ namespace RPGCreationKit.AI
return a;
}
private void OnDisable()
{
private void OnDisable() {
UnloadPrefab();
DestroyImmediate(windowEditor);
}
private void OnDestroy()
{
private void OnDestroy() {
UnloadPrefab();
DestroyImmediate(windowEditor);
}
private void OnChangeHairColor(Color co) {
SkinnedMeshRenderer Hair = (RckAIGfx).GetComponent<BodyData>().hair;
Material[] MyMats = Hair.materials;
for (int i = 0; i < MyMats.Length; i++)
MyMats[i].SetColor("_Diffuse", co);
OrigHair.Clear(); // Lets save originals first
GameObject OrigGFX = RckAIAsset.transform.Find("GFX").gameObject;
SkinnedMeshRenderer OrigMHair = (OrigGFX).GetComponent<BodyData>().hair;
for (int i = 0; i < OrigMHair.sharedMaterials.Length; i++)
OrigHair.Add(OrigMHair.sharedMaterials[i]);
SkinnedMeshRenderer Hair = (RckAIGfx).GetComponent<BodyData>().hair; // now we change the tempPrefab colors
for (int i = 0; i < Hair.materials.Length; i++)
Hair.materials[i].SetColor("_Diffuse", co);
}
private void OnChangeLipsColor(Color co) {
OrigLips.Clear(); // Lets save originals first
GameObject OrigGFX = RckAIAsset.transform.Find("GFX").gameObject;
SkinnedMeshRenderer OrigMLips = (OrigGFX).GetComponent<BodyData>().Lips;
for (int i = 0; i < OrigMLips.sharedMaterials.Length; i++)
OrigLips.Add(OrigMLips.sharedMaterials[i]);
SkinnedMeshRenderer Lips = (RckAIGfx).GetComponent<BodyData>().Lips;
Material[] MyMats = Lips.materials;
for (int i = 0; i < MyMats.Length; i++)
MyMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < Lips.materials.Length; i++)
Lips.materials[i].SetColor("_Diffuse", co);
}
private void OnChangeSkinColor(Color co) {
OrigSkin.Clear(); // Lets save originals first
GameObject OrigGFX = RckAIAsset.transform.Find("GFX").gameObject;
BodyData MBD = (OrigGFX).GetComponent<BodyData>();
for (int i = 0; i < MBD.upperbody.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.upperbody.sharedMaterials[i]);
for (int i = 0; i < MBD.lowerbody.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.lowerbody.sharedMaterials[i]);
for (int i = 0; i < MBD.head.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.head.sharedMaterials[i]);
for (int i = 0; i < MBD.arms.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.arms.sharedMaterials[i]);
for (int i = 0; i < MBD.hands.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.hands.sharedMaterials[i]);
for (int i = 0; i < MBD.feet.sharedMaterials.Length; i++)
OrigSkin.Add(MBD.feet.sharedMaterials[i]);
BodyData BD = (RckAIGfx).GetComponent<BodyData>(); // Setting the Temp Prefab
for (int i = 0; i < BD.upperbody.materials.Length; i++)
BD.upperbody.materials[i].SetColor("_Diffuse", co);
for (int i = 0; i < BD.lowerbody.materials.Length; i++)
BD.lowerbody.materials[i].SetColor("_Diffuse", co);
for (int i = 0; i < BD.head.materials.Length; i++)
BD.head.materials[i].SetColor("_Diffuse", co);
for (int i = 0; i < BD.arms.materials.Length; i++)
BD.arms.materials[i].SetColor("_Diffuse", co);
for (int i = 0; i < BD.hands.materials.Length; i++)
BD.hands.materials[i].SetColor("_Diffuse", co);
for (int i = 0; i < BD.feet.materials.Length; i++)
BD.feet.materials[i].SetColor("_Diffuse", co);
}
private void ResetHairColor() {
BodyData BD = (RckAIGfx).GetComponent<BodyData>();
SkinnedMeshRenderer Torso = BD.upperbody;
SkinnedMeshRenderer Legs = BD.lowerbody;
SkinnedMeshRenderer Head = BD.head;
SkinnedMeshRenderer Arms = BD.arms;
SkinnedMeshRenderer Hands = BD.hands;
SkinnedMeshRenderer Feet = BD.feet;
SkinnedMeshRenderer Lips = BD.Lips;
Material[] MyTorsoMats = Torso.materials;
Material[] MyLegsMats = Legs.materials;
Material[] MyHeadMats = Head.materials;
Material[] MyArmsMats = Arms.materials;
Material[] MyHandsMats = Hands.materials;
Material[] MyFeetMats = Feet.materials;
Material[] MyLipsMats = Lips.materials;
for (int i = 0; i < MyTorsoMats.Length; i++)
MyTorsoMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < MyLegsMats.Length; i++)
MyLegsMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < MyHeadMats.Length; i++)
MyHeadMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < MyArmsMats.Length; i++)
MyArmsMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < MyHandsMats.Length; i++)
MyHandsMats[i].SetColor("_Diffuse", co);
for (int i = 0; i < MyFeetMats.Length; i++)
MyFeetMats[i].SetColor("_Diffuse", co);
Material[] TempMe = new Material[BD.hair.materials.Length];
for (int i = 0; i < BD.hair.materials.Length; i++)
TempMe[i] = OrigHair[i];
BD.hair.materials = TempMe;
}
private void RefreshMyWindow() {
this.Repaint();
windowEditor.Repaint();
windowEditor.ReloadPreviewInstances();
windowEditor.Repaint();
this.Repaint();
private void ResetLipsColor() {
BodyData BD = RckAIGfx.GetComponent<BodyData>();
Material[] TempMe = new Material[BD.Lips.materials.Length];
for (int i = 0; i < BD.Lips.materials.Length; i++)
TempMe[i] = OrigLips[i];
BD.Lips.materials = TempMe;
}
private void ResetSkinColor() {
BodyData BD = RckAIGfx.GetComponent<BodyData>();
int j = 0;
Material[] TempMe = new Material[BD.upperbody.materials.Length];
for (int i = 0; i < BD.upperbody.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.upperbody.materials = TempMe;
TempMe = new Material[BD.lowerbody.materials.Length];
for (int i = 0; i < BD.lowerbody.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.lowerbody.materials = TempMe;
TempMe = new Material[BD.head.materials.Length];
for (int i = 0; i < BD.head.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.head.materials = TempMe;
TempMe = new Material[BD.arms.materials.Length];
for (int i = 0; i < BD.arms.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.arms.materials = TempMe;
TempMe = new Material[BD.hands.materials.Length];
for (int i = 0; i < BD.hands.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.hands.materials = TempMe;
TempMe = new Material[BD.feet.materials.Length];
for (int i = 0; i < BD.feet.materials.Length; i++) {
TempMe[i] = OrigSkin[j];
j += 1;
}
BD.feet.materials = TempMe;
}
}
}

View File

@ -10,7 +10,7 @@ namespace RPGCreationKit
// The entity who's holding the weapon
public AudioSource audioSource;
public Entity thisEntity;
[SerializeField] private BodyData GFX;
[SerializeField] public BodyData GFX;
[SerializeField] private GameObject Prefab;
public IMeleeAttacker thisAttacker;
@ -37,7 +37,7 @@ namespace RPGCreationKit
Vector3 lastPos;
public float tickness = .1f;
public float tickness = .2f;
List<IHittable> hitInThisSwing = new List<IHittable>();
List<IDamageable> damageableHitInThisSwing = new List<IDamageable>();
@ -265,7 +265,7 @@ namespace RPGCreationKit
{
GameObject hand;
tickness = 0.4f;
tickness = 0.3f;
Transform[] objs = Resources.FindObjectsOfTypeAll<Transform>() as Transform[];
for (int i = 0; i < objs.Length; i++){

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More