Compare commits

...

3 Commits

Author SHA1 Message Date
102b4fb7bf Revert "Merge branch 'main' of https://git.bibko.uk/Pasha/Pacore"
This reverts commit 0dc0896291, reversing
changes made to 1524422b09.
2026-02-02 10:26:54 +00:00
0dc0896291 Merge branch 'main' of https://git.bibko.uk/Pasha/Pacore 2026-02-02 10:19:51 +00:00
1524422b09 Updated workflow for correct folder layout 2026-02-02 10:19:43 +00:00
5 changed files with 10 additions and 39 deletions

View File

@@ -15,20 +15,18 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup package folder
- name: Setup Unity package folder
run: |
PACKAGE_NAME="com.pashabibko.pacore"
mkdir -p package/$PACKAGE_NAME
rsync -av --exclude='*.meta' Assets/Pacore/ package/$PACKAGE_NAME/
mkdir -p package
rsync -av --exclude='*.meta' Assets/Pacore/ package/
- name: Zip package
- name: Create tarball
run: |
VERSION=${{ github.event.inputs.version }}
ZIP_NAME="pacore-$VERSION.zip"
cd package
zip -r ../$ZIP_NAME ./*
cd ..
ls -1h $ZIP_NAME
PACKAGE_NAME="com.pashabibko.pacore-${VERSION}.tgz"
tar -czf "$PACKAGE_NAME" package
ls -1h "$PACKAGE_NAME"
- name: Create Github Release
uses: ncipollo/release-action@v1
@@ -36,7 +34,7 @@ jobs:
tag: ${{ github.event.inputs.version }}
name: Release ${{ github.event.inputs.version }}
body: "Automated release of Pacore package"
artifacts: "pacore-${{ github.event.inputs.version }}.zip"
artifacts: "com.pashabibko.pacore-${{ github.event.inputs.version }}.tgz"
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System;
using System.Diagnostics;
using UnityEngine;
namespace PashaBibko.Pacore
@@ -10,15 +9,6 @@ namespace PashaBibko.Pacore
public static class ClassAttributeCache
{
private static Dictionary<Type, List<Type>> AttributeCache { get; set; }
private static DelegateFunction OnCacheInstantiated = LogCacheInformation;
private static int AttributeCount;
private static int ClassCount;
private static long TimeTaken;
private static void LogCacheInformation()
{
}
public static ReadOnlyCollection<Type> GetAttributesOf<T>()
{
@@ -30,8 +20,6 @@ namespace PashaBibko.Pacore
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
private static void ScanAllAssemblies()
{
Stopwatch timer = Stopwatch.StartNew();
/* Fetches all the class types in all loaded assemblies */
Type[] classes = AppDomain.CurrentDomain.GetAssemblies() // Assembly[]
.SelectMany(assembly => assembly.GetTypes()) // IEnumerable<Type>
@@ -64,14 +52,6 @@ namespace PashaBibko.Pacore
AttributeCache[type].Add(current);
}
}
/* Stores all relevant info for logging */
TimeTaken = timer.ElapsedMilliseconds;
AttributeCount = AttributeCache.Count;
ClassCount = classes.Length;
/* Calls the delegate function for any dependencies */
OnCacheInstantiated.Invoke();
}
}
}

View File

@@ -1,4 +0,0 @@
namespace PashaBibko.Pacore
{
public delegate void DelegateFunction();
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 627efc92baea4fec9e576642408e796c
timeCreated: 1769701523

View File

@@ -1,7 +1,7 @@
{
"name": "com.pashabibko.pacore",
"displayName": "Pacore",
"version": "1.0.0",
"version": "1.1.1-alpha",
"unity": "2022.3",
"description" : "Small Unity Util library",
"keywords": [ "tool", "script", "runtime" ],